sqlite3 - I think I need to change the format of how the date is stored -


i have field in sqlite3 database stored date field.
not thinking, entered date in format mm/dd/yyyy , none of date functions work.

is there simple way can convert dates proper format can perform searches work correctly?

if fields have fixed length, can extract them few simple substr calls:

update mytable set datecolumn = substr(datecolumn, 7, 4) || '-' ||                  substr(datecolumn, 1, 2) || '-' ||                  substr(datecolumn, 4, 2); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -