From: | "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | what's wrong with my date comparison? |
Date: | 2007-10-16 17:57:03 |
Message-ID: | FE44E0D7EAD2ED4BB2165071DB8E328C03062CEA@egcrc-ex01.egcrc.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi Everybody,
I have a table with a column of timestamp type. It is
known to postgres like this:
name | character varying | not null
value | character varying | not null
datecreated | timestamp without time zone | not null
when I do query
select name, value, datecreated
from mytable
where datecreated > 2007-10-02;
it reports:
name | value | datecreated
----------+----------------------+-------------------------
al_qual | 0 | 2007-08-09 00:06:06.742
srehquan | 3 | 2007-08-09 00:06:06.742
complete | 1 | 2007-08-09 00:06:06.743
al_quan | 0.315924933 | 2007-08-09 00:06:06.742
bsa_qual | 0 | 2007-08-09 00:06:06.743
bsl_qual | 2 | 2007-08-09 00:06:06.743
sh_qual | 0 | 2007-08-09 00:06:06.742
. . . .
. . . .
I don't understand why it thinks August is greater than
October. Can someone please elucidate what is going on?
Regards,
Tena Sakai
tsakai(at)gallo(dot)ucsf(dot)edu
From | Date | Subject | |
---|---|---|---|
Next Message | Tena Sakai | 2007-10-16 18:00:08 | Re: what's wrong with my date comparison? |
Previous Message | Michael Glaesemann | 2007-10-16 17:34:13 | Re: Having difficulty writing a "best-fit" query.. |