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:01:35
Message-ID: 4AB26B6F.4010207@sympatico.ca
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gavin McCullagh 2009-09-17 17:30:40 Re: extracting from epoch values in pgsql
Previous Message Gavin McCullagh 2009-09-17 16:44:39 extracting from epoch values in pgsql