A week or so ago, someone posted about datetime(1) results not being the
same as strftime("%Y-%m-%d %H:%M:%S",1) (sorry I have deleted OP msg) as
per documentation.
With:
sqlite> .ver
SQLite 3.7.13 2012-07-17 17:46:21
Of coarse, this may not apply to later versions.
sqlite> select datetime(1);
-4713-11-25 12:00:00 <-- 4 digit year
and
sqlite> select strftime("%Y-%m-%d %H:%M:%S",1);
-471-11-25 12:00:00 <-- 3 digit year
are not equal.
So:
sqlite> select strftime("%J","0000-01-01");
1721059.500000001
sqlite> select date(1721060);
0000-01-01
sqlite> select strftime("%Y-%m-%d",1721060);
0000-01-01
sqlite> select date(1721059);
-001-12-31 <-- 3 digit year
sqlite> select strftime("%Y-%m-%d",1721059);
-001-12-31 <-- 3 digit year
sqlite> select date(1000000);
-1975-10-21 <-- 4 digit year
sqlite> select strftime("%Y-%m-%d",1000000);
-197-10-21 <-- 3 digit year
I think year should always be rendered with 4 digits in this format,
regardless of sign, but that may not be the only issue.
If this is a bug that persists into current release, could someone
please register it for attention as I won't be on line again for a week
or so.
John
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users