Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

datetime queries in postgres



I'm having some very strange problems in Postgres (7.0.2)

There's a DATETIME field in the table. Most of queries with
this field give wrong results:

>SELECT time FROM tb;

2001-05-18 07:45:26+09
2001-05-18 07:45:28+09
2001-05-18 08:58:06+09
2001-05-18 08:58:06+09

>SELECT * FROM tb WHERE time > '2000-05-18 8:00:00';

2001-05-18 07:45:26+09
2001-05-18 07:45:28+09
2001-05-18 08:58:06+09
2001-05-18 08:58:06+09

>SELECT * FROM tb WHERE time < '2000-05-18 8:00:00';

(0 rows)

Adding +9 to the time string doesn't change anything.
(and I omit the one I started with, BETWEEN thing)

What am I doing wrong?

Viktor

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links