Hi all,
I'm trying to translate some MySQL to sqlite. Ran into a problem with this
time comparison statement. I translated as best I could, it seems to work,
is this alright? (I'm trying to see if any records are more than 7 days old,
based on the value of 'arrival_date' field):
Original:
SELECT school_name from schools WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) >
arrival_date"
To sqlite:
SELECT school_name from schools WHERE julianday('now') -
julianday(arrival_date) > 7
And an example of the date value stored in the 'arrival_date' field looks
like:
'2006-01-10 16:14:19'
Thanks,
Mark