Okay...
https://www.sqlite.org/lang_datefunc.html

https://www.sqlite.org/datatype3.html /* lists DateTime as a distinct type
*/

I understand it's kept as a string... and there's no internal functions for
this... but wasn't there a discussion to add hex and octal etc support for
number conversions?  1.2Meg of stuff and you can't have a few 30 line
functions to convert to gregorian calander day/second of day for
calculation(julian day and second tick); amazing.

----------
Since on the datefunc page

Formats 2 through 10 may be optionally followed by a timezone indicator of
the form "*[+-]HH:MM*" or just "*Z*". The date and time functions use UTC
or "zulu" time internally, and so the "Z" suffix is a no-op. Any non-zero
"HH:MM" suffix is subtracted from the indicated date and time in order to
compute zulu time. For example, all of the following time strings are
equivalent:

2013-10-07 08:23:19.120
2013-10-07T08:23:19.120Z
2013-10-07 04:23:19.120-04:00
2456572.84952685

Defines equivalency... I would have assumed that inequalities could also be
done.


And since 'formats supported' are specified, one would assume that datetime
columns with supported strings would work with at least =, >= <=, <, >, !=

------------
I'll add a user function or something instead I guess...


On Fri, Jan 2, 2015 at 3:21 PM, Clemens Ladisch <clem...@ladisch.de> wrote:

> 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
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to