SQLite Order By Date1530019888000

前端 未结 9 739
臣服心动
臣服心动 2020-12-01 03:27

Every record in my SQLite database contains a field which contains a Date stored as a string in the format \'yyyy-MM-dd HH:mm:ss

9条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 04:05

    In my case everything works fine without casting column to type 'date'. Just by specifying column name with double quotes like that:

    SELECT * FROM 'Repair' ORDER BY "Date" DESC;
    

    I think SQLite makes casting by itself or something like that, but when I tried to 'cast' Date column by myself it's not worked. And there was no error messages.

提交回复
热议问题