From: Michael Fuhr <mike@fuhr.org>
To: Seader, Cameron <CSeader@idahopower.com>
Cc: pgsql-php@postgresql.org
Subject: Re: SQL convert UTC to MST
Date: Sat, 27 Dec 2003 23:04:21 -0700
Message-ID: <20031227230421.A5893@quality.qadas.com> (raw)
In-Reply-To: <71B8A8BEC516CF46835CA629156CF21163F6EE@bedford.idacorp.local>
References: <71B8A8BEC516CF46835CA629156CF21163F6EE@bedford.idacorp.local>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: mike@fuhr.org, CSeader@idahopower.com
Subject: Re: SQL convert UTC to MST
In-Reply-To: <20031227230421.A5893@quality.qadas.com>
References: <71B8A8BEC516CF46835CA629156CF21163F6EE@bedford.idacorp.local> <20031227230421.A5893@quality.qadas.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox