Lexa

WPF, C#, Objective C and a little Math

Transform FILETIME to human readable string in SQLite request

And the magic formula is:

select datetime(
(YourTimeColumnName - 116444736000000000)/10000000,
'unixepoch')
from YourTableName

It took for me quite some time to create this expression, since I’m pretty dumb in SQL.
But it seems to work, and probably someone will need it, so its posted!
If YourTimeColumnName is in string format, cast function must be used.


Categorised as: Uncategorized


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>