Re: SQL convert UTC to MST

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Seader, Cameron" <CSeader(at)idahopower(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: SQL convert UTC to MST
Date: 2003-12-28 06:04:21
Message-ID: 20031227230421.A5893@quality.qadas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Steve Crawford 2003-12-29 22:02:35 Re: SQL convert UTC to MST
Previous Message Seader, Cameron 2003-12-27 23:37:32 SQL convert UTC to MST