Skip to main content
February 15, 2013
Question

SQLite Time Select?

  • February 15, 2013
  • 1 reply
  • 796 views

First time using SQLite in AIR and having trouble with a select. I have a TEXT type field with a time stamp in it - with the form yyyy-mm-dd hh:mm:ss

I need to select all records within the last hour.

Found some selects that work with MySQL, but haven't gotten anything to work with SQLite thus far.

This topic has been closed for replies.

1 reply

February 15, 2013

I think I mostly have it. Aside from not using timezones when storing the timestamp, the select is something like this:

select * from users where datetime(timeentered) > datetime('now','-1 hours')