J Decker wrote:
> is this... 2015-01-02 20:47:18  (this is datetime( 'now', '-3600 second' )
>
> received = 2015-01-02 13:46:23.818-0800  this is a DATETIME column recorded
> in the database

SQLite has no DATETIME datatype.  This is just a string.

> select * from messages where received < datetime( 'now', '-3600' )

This compares two strings.

> delete  from messages where datetime(received) < datetime( 'now', '-3600' )

Something like this is needed, but you need to use a string containing a date
value in a supported format:

$ sqlite3
sqlite> select '2015-01-02 13:46:23.818-0800' < datetime('2015-01-02 20:47:18');
1
sqlite> select datetime('2015-01-02 13:46:23.818-0800') < datetime('2015-01-02 
20:47:18');

sqlite> select datetime('2015-01-02 13:46:23.818-08:00') < datetime('2015-01-02 
20:47:18');
0

> to apply the function to the column again?

Why are you using the word "again"?


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to