Search Postgresql Archives

Re: How to typecast an integer into a timestamp?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, January 28, 2012 1:43:43 am Bruno Boettcher wrote:
> On Fri, Jan 27, 2012 at 08:17:37AM -0800, Adrian Klaver wrote:
> > Did some digging. php-mktime returns the Unix epoch (seconds since
> > January 1 1970 00:00:00 GMT)
> 
> indeed, didn't get it that postgres timestamp wasn't the same....

Well internally they are stored that way.  You just have to input the 
values as some sort of time/date/timestamp string. For all the details see here:

http://www.postgresql.org/docs/9.0/interactive/datatype-datetime.html#DATATYPE-DATETIME-INPUT

> 
>   ciao
>   Bruno

-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux