pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gavin McCullagh <gavin.mccullagh@gcd.ie>
To: Osvaldo Kussama <osvaldo.kussama@gmail.com>
Cc: Frank Bax <fbax@sympatico.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: extracting from epoch values in pgsql
Date: Thu, 17 Sep 2009 18:37:44 +0100
Message-ID: <20090917173744.GA2419@gcd.ie> (raw)
In-Reply-To: <690707f60909171032q4ba19ef8y30e31c7f7ca0a0b0@mail.gmail.com>
References: <20090917164439.GU16815@gcd.ie>
	<4AB26B6F.4010207@sympatico.ca>
	<20090917173039.GV16815@gcd.ie>
	<690707f60909171032q4ba19ef8y30e31c7f7ca0a0b0@mail.gmail.com>

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





view thread (9+ messages)  latest in thread

Message-ID: <20090917173744.GA2419@gcd.ie>
Permalink:  ../20090917173744.GA2419@gcd.ie/
Also on:    postgresql.org/message-id/20090917173744.GA2419@gcd.ie

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gavin.mccullagh@gcd.ie, osvaldo.kussama@gmail.com, fbax@sympatico.ca
  Subject: Re: extracting from epoch values in pgsql
  In-Reply-To: <20090917173744.GA2419@gcd.ie>

* 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