views:

442

answers:

1

I have a Sqlite database that I am using as an ado.net job store for my Quartz.net scheduler jobs. In one table, a column called START_TIME is of type big int.

Is there a way to cast or convert a bigint to a date value? I would like to be able to query the database to see which jobs are scheduled at what date/time and a value such as 633869892000000000 is meaningless.

Thanks!

+1  A: 

Assuming that START_TIME is the standard seconds-since-Unix-epoch, you can use:

select datetime(MyBigIntColumn, 'unixepoch');

See http://www.sqlite.org/lang_datefunc.html, "Modifiers" section.

Ian Kemp