0

consider the following SQL in SQLITE

CREATE TABLE filemeta (filemeta_id INTEGER PRIMARY KEY, localLastModified DATETIME)

now explain why these don't work properly ?

select datetime(localLastModified,"YYYY-MM-DD HH:MM:SS") AS localLastModified from filemeta
select datetime(localLastModified) from filemeta

but this does work (until I use it in C#, when it doesn't work if null due to a known bug)

select localLastModified from filemeta
Community
  • 1
  • 1
user26676
  • 280
  • 3
  • 21
  • can u add some examples in ur question? – Narendra Apr 08 '14 at 11:27
  • ? other than the examples ? – user26676 Apr 08 '14 at 11:29
  • What documentation says that there is a data type named [DATETIME](http://www.sqlite.org/datatype3.html#datetime), or that the [datetime function](http://www.sqlite.org/lang_datefunc.html) can be used with a format string? – CL. Apr 08 '14 at 16:45
  • fist of all sqlite "works" with a DATETIME artifact datatype despite there being none. it uses TEXT for everything (rubbish idea) but you forget that I told you the 3rd one works.. oh well – user26676 Apr 09 '14 at 08:41

0 Answers0