Re: TIMESTAMP with a timezone offset

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: TIMESTAMP with a timezone offset
Дата
Msg-id 49480056.8070204@iol.ie
обсуждение исходный текст
Ответ на TIMESTAMP with a timezone offset  (Madison Kelly <linux@alteeve.com>)
Ответы Re: TIMESTAMP with a timezone offset  (Madison Kelly <linux@alteeve.com>)
Список pgsql-general
On 16/12/2008 19:16, Madison Kelly wrote:
>   I want to say in my WHERE clause to offset the value I am giving by X
> number of hours and to display the column I've cast as a timestamp
> offset by the same X hours.

You could use AT TIME ZONE to shift it the required number of hours:

http://www.postgresql.org/docs/8.3/static/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT

I hope this helps.

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

В списке pgsql-general по дате отправления:

Предыдущее
От: Madison Kelly
Дата:
Сообщение: TIMESTAMP with a timezone offset
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Isolating a record column from a PL-Pgsql function call ?