Re: SQL convert UTC to MST - Mailing list pgsql-php

From Michael Fuhr
Subject Re: SQL convert UTC to MST
Date
Msg-id 20031227230421.A5893@quality.qadas.com
Whole thread Raw
In response to SQL convert UTC to MST  ("Seader, Cameron" <CSeader@idahopower.com>)
List 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 by date:

Previous
From: "Seader, Cameron"
Date:
Subject: SQL convert UTC to MST
Next
From: Steve Crawford
Date:
Subject: Re: SQL convert UTC to MST