Re: extracting from epoch values in pgsql - Mailing list pgsql-sql

From Frank Bax
Subject Re: extracting from epoch values in pgsql
Date
Msg-id 4AB26B6F.4010207@sympatico.ca
Whole thread Raw
In response to extracting from epoch values in pgsql  (Gavin McCullagh <gavin.mccullagh@gcd.ie>)
Responses Re: extracting from epoch values in pgsql  (Gavin McCullagh <gavin.mccullagh@gcd.ie>)
List 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)




pgsql-sql by date:

Previous
From: Gavin McCullagh
Date:
Subject: extracting from epoch values in pgsql
Next
From: Gavin McCullagh
Date:
Subject: Re: extracting from epoch values in pgsql