From: Michael Fuhr <mike@fuhr.org>
To: Wei <wengwei@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I convert an integet to a timestamp?
Date: Mon, 12 Sep 2005 22:53:07 -0600
Message-ID: <20050913045307.GA98267@winnie.fuhr.org> (raw)
In-Reply-To: <1126548068.702382.67260@z14g2000cwz.googlegroups.com>
References: <1126548068.702382.67260@z14g2000cwz.googlegroups.com>
On Mon, Sep 12, 2005 at 11:01:08AM -0700, Wei wrote:
> 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 documentation suggested casting an integer to a timestamp?
> What is the proper way to do the conversion?
See "Date/Time Functions and Operators" -- it has an example of what
you're trying to do:
http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html
--
Michael Fuhr
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: mike@fuhr.org, wengwei@gmail.com
Subject: Re: How do I convert an integet to a timestamp?
In-Reply-To: <20050913045307.GA98267@winnie.fuhr.org>
* 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