pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-admin@postgresql.org
Cc: LiveShell <liveshell@gmail.com>
Subject: Re: biginteger to timestamp
Date: Thu, 20 Jul 2006 11:32:30 +0200
Message-ID: <200607201132.31207.peter_e@gmx.net> (raw)
In-Reply-To: <928fe9b50607200226w3c9eca67h5e0e5d9a4466aeef@mail.gmail.com>
References: <928fe9b50607200226w3c9eca67h5e0e5d9a4466aeef@mail.gmail.com>

Am Donnerstag, 20. Juli 2006 11:26 schrieb LiveShell:
>          I want to convert biginteger and integer data type to timestamp
> data type.

That depends mostly on what kind of meaning you intend to attach to an integer 
N.   If you want seconds since 1970, you could do

x * interval '1 second' + timestamp '1970-01-01'

For other meanings, adjust as necessary.
-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



view thread (6+ messages)  latest in thread

Message-ID: <200607201132.31207.peter_e@gmx.net>
Permalink:  ../200607201132.31207.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200607201132.31207.peter_e@gmx.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: peter_e@gmx.net, liveshell@gmail.com
  Subject: Re: biginteger to timestamp
  In-Reply-To: <200607201132.31207.peter_e@gmx.net>
  References: <928fe9b50607200226w3c9eca67h5e0e5d9a4466aeef@mail.gmail.com> <200607201132.31207.peter_e@gmx.net>

* 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