Re: SQL convert UTC to MST

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: SQL convert UTC to MST
Дата
Msg-id 200312291402.35789.scrawford@pinpointresearch.com
обсуждение исходный текст
Ответ на SQL convert UTC to MST  ("Seader, Cameron" <CSeader@idahopower.com>)
Ответы displaying a rowset in php...same column names  (Michael Hanna <taojones@sympatico.ca>)
Список pgsql-php
On Saturday 27 December 2003 3:37 pm, 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. any input would be helpful
> Thanks,

Depends. If the data is an INT (seconds from the epoch) and your
timezone is set correctly then abstime(utctime) should give you local
time (adjusted appropriately for Daylight Saving).

What is the data type of utctime?

Cheers,
Steve


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: SQL convert UTC to MST
Следующее
От: Michael Hanna
Дата:
Сообщение: displaying a rowset in php...same column names