Re: How do I convert an integet to a timestamp?

From: "Eugene E(dot)" <sad(at)bankir(dot)ru>
To: Wei <wengwei(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How do I convert an integet to a timestamp?
Date: 2005-09-13 08:45:06
Message-ID: 43269192.2060603@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Wei wrote:
> Hi.
>
> I followed the doc and tried "select CAST(1126547334 AS timestamp)" and
> I only got an error response that says: ERROR: cannot cast type
> integer to timestamp without time zone.
>
> What is the proper way to do the conversion?

select 123456789::abstime::timestamp;

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Marcin Piotr Grondecki 2005-09-13 14:04:03 Re: SELECT: retrieve only 2 rows next to known row
Previous Message Michael Glaesemann 2005-09-13 05:12:27 Re: Age in days