SQLite – How to Change Date Format Using SQL

sqlite

I have column with strings of dates with format: "dd.mm.yyyy".
I need to convert the date format contained in the strings to ISO8601 format: "YYYY-MM-DD" for the whole column.

Best Answer

String manipulation seems to way to go here:

UPDATE myTable
  SET myDate = SUBSTR(myDate, 7, 4)
     || '-' || SUBSTR(myDate, 4, 2)
     || '-' || SUBSTR(myDate, 1, 2)