From: | "Harry Hehl" <Harry(dot)Hehl(at)diskstream(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Timestamp with timezone query |
Date: | 2006-09-25 15:05:55 |
Message-ID: | 6AD4F3A63B017C4FB074E2C895AD185488C675@EXCHSRV.waterloonetworking.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I have a table with TIMESTAMP WITH TIMEZONE column. I would like to
query for a timestamp using a different timezone.
For example if a column contains '2006-02-11 00:30:00-05'
select * from table where column='2006-02-10 19:30:00+00' would return
the column containing '2006-02-11 00:30:00-05'.
From section 8.5.1.3 "To ensure that a literal is treated as timestamp
with time zone, give it the correct explicit type: TIMESTAMP WITH TIME
ZONE '2004-10-19 10:23:54+02'"
So I tried:
select * from table where column = TIMESTAMP WITH TIME ZONE '2006-02-10
19:30:00+00'
But it did not returned the desired result.
I am getting the timestamp as UTC and want to use to build a query, but
I don't want Postgres convert the timestamp. Is there anyway to do this?
Thanks
From | Date | Subject | |
---|---|---|---|
Next Message | Brandon Aiken | 2006-09-25 15:38:34 | Re: Timestamp with timezone query |
Previous Message | Brandon Aiken | 2006-09-25 14:47:11 | Re: serial column |