pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eugene E. <sad@bankir.ru>
To: Wei <wengwei@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I convert an integet to a timestamp?
Date: Tue, 13 Sep 2005 12:45:06 +0400
Message-ID: <43269192.2060603@bankir.ru> (raw)
In-Reply-To: <1126548068.702382.67260@z14g2000cwz.googlegroups.com>
References: <1126548068.702382.67260@z14g2000cwz.googlegroups.com>

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;



view thread (3+ messages)

Message-ID: <43269192.2060603@bankir.ru>
Permalink:  ../43269192.2060603@bankir.ru/
Also on:    postgresql.org/message-id/43269192.2060603@bankir.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sad@bankir.ru, wengwei@gmail.com
  Subject: Re: How do I convert an integet to a timestamp?
  In-Reply-To: <43269192.2060603@bankir.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox