Afternoon all,

I have the following schema:

CREATE TABLE day
("id" INTEGER PRIMARY KEY,
"timestamp" DATETIME,
"value" REAL);

And the following sample data:

INSERT INTO day VALUES (NULL, "2012-01-01", "5.0");
INSERT INTO day VALUES (NULL, "2012-01-02", "6.0");
INSERT INTO day VALUES (NULL, "2012-01-03", "7.0");
INSERT INTO day VALUES (NULL, "2012-01-04", "5.0");

When I perform the following query I don't get the expected result:

SELECT * FROM day WHERE timestamp >= '2012-01-01 00:00:00';
2|2012-01-02|6.0
3|2012-01-03|7.0
4|2012-01-04|5.0

Why does this happen? Is this the sort of thing I should bother the SQLite
develops with (via bug report)?

*(I know I can do either of the following to get the expected result:*
*
*
*SELECT * FROM day WHERE timestamp >= date('2012-01-01 00:00:00');*
*SELECT * FROM day WHERE datetime(timestamp) >= '2012-01-01 00:00:00';)*
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to