Re: extracting from epoch values in pgsql

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: extracting from epoch values in pgsql
Date: 2009-09-17 17:38:34
Message-ID: 4AB2741A.2050409@sympatico.ca
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gavin McCullagh wrote:
> On Thu, 17 Sep 2009, Frank Bax wrote:
>
>> Gavin McCullagh wrote:
>>> SELECT time, to_timestamp(time) AS ts,
>>> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
>>> ERROR: syntax error at or near ","
>>> LINE 1: ...t time, to_timestamp(time) AS ts, extract('months',to_times...
>> Try replacing extract('month',value) with extract('months' from value)
>
> Makes no difference whether month or months:

Sorry; my typo. You used a comma in "extract" instead of "from".

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kenneth Marshall 2009-09-17 17:39:59 Re: extracting from epoch values in pgsql
Previous Message Gavin McCullagh 2009-09-17 17:37:44 Re: extracting from epoch values in pgsql