Re: SQL convert UTC to MST

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: SQL convert UTC to MST
Дата
Msg-id 20031227230421.A5893@quality.qadas.com
обсуждение исходный текст
Ответ на SQL convert UTC to MST  ("Seader, Cameron" <CSeader@idahopower.com>)
Список pgsql-php
On Sat, Dec 27, 2003 at 04:37:32PM -0700, Seader, Cameron wrote:
> I cannot figure this out, and im no SQL guru and would like to do this
> with an SQL statement if i can. so far here is my SQL statement.
>
> SELECT * FROM t444d500009b5_4_6 ORDER BY utctime DESC
>
> What can i add here to have the column in this table converted from
> UTC to MST.

What data type is the utctime field?  AT TIME ZONE converts between time
zones, but its use varies depending on the data type you're working with.

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

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: "Seader, Cameron"
Дата:
Сообщение: SQL convert UTC to MST
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: SQL convert UTC to MST