Re: extracting from epoch values in pgsql

From: Gavin McCullagh <gavin(dot)mccullagh(at)gcd(dot)ie>
To: Osvaldo Kussama <osvaldo(dot)kussama(at)gmail(dot)com>
Cc: Frank Bax <fbax(at)sympatico(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: extracting from epoch values in pgsql
Date: 2009-09-17 17:37:44
Message-ID: 20090917173744.GA2419@gcd.ie
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 17 Sep 2009, Osvaldo Kussama wrote:

> From manual:
> http://www.postgresql.org/docs/current/interactive/functions-datetime.html
>
> date_part('month',to_timestamp(time))
> or
> extract(month from to_timestamp(time))

Gah. I don't know I missed that. This works fine.

SELECT extract(month from to_timestamp(time))
FROM mdl_log;

Many thanks,
Gavin

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Bax 2009-09-17 17:38:34 Re: extracting from epoch values in pgsql
Previous Message Gavin McCullagh 2009-09-17 17:34:39 Re: extracting from epoch values in pgsql