Thread: epoch

epoch

From
Patrick Welche
Date:
Trying example from:

http://www.postgresql.org/devel-corner/docs/user/functions-datetime.html

patrimoine=# SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40');
ERROR:  parser: parse error at or near "epoch"
patrimoine=# select version();                                   version                                    
-------------------------------------------------------------------------------PostgreSQL 7.1beta3 on
i386-unknown-netbsdelf1.5Q,compiled by GCC egcs-1.1.2
 
(1 row)

patrimoine=# select date_part('epoch','2001-02-16 20:38:40'::timestamp);date_part 
-----------982355920
(1 row)

Is my version already too old?

Cheers,

Patrick


Re: epoch

From
Peter Eisentraut
Date:
Patrick Welche writes:

> http://www.postgresql.org/devel-corner/docs/user/functions-datetime.html
>
> patrimoine=# SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40');
> ERROR:  parser: parse error at or near "epoch"
> patrimoine=# select version();
>                                     version
> -------------------------------------------------------------------------------
>  PostgreSQL 7.1beta3 on i386-unknown-netbsdelf1.5Q, compiled by GCC egcs-1.1.2
> (1 row)

> Is my version already too old?

Yes.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/