Re: SQL convert UTC to MST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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/


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux