Re: biginteger to timestamp

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: LiveShell <liveshell(at)gmail(dot)com>
Subject: Re: biginteger to timestamp
Date: 2006-07-20 09:32:30
Message-ID: 200607201132.31207.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message hubert depesz lubaczewski 2006-07-20 09:32:45 Re: biginteger to timestamp
Previous Message LiveShell 2006-07-20 09:26:51 biginteger to timestamp