Re: Datetime stored in bigint

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Cc: pgsql-novice(at)postgresql(dot)org Content-Type: multipart/alternative; boundary=0016364edde09e17a304a821111d X-Virus-Scanned: Maia Mailguard 1(dot)0(dot)1 X-Mailing-List: pgsql-novice List-Archive: <http://archives(dot)postgresql(dot)org/pgsql-novice> List-Help: <mailto:majordomo(at)postgresql(dot)org?body=help> List-ID: <pgsql-novice(dot)postgresql(dot)org> List-Owner: <mailto:pgsql-novice-owner(at)postgresql(dot)org> List-Post: <mailto:pgsql-novice(at)postgresql(dot)org> List-Subscribe: <mailto:majordomo(at)postgresql(dot)org?body=sub%20pgsql-novice> List-Unsubscribe: <mailto:majordssdev938(at)gmail(dot)com
Subject: Re: Datetime stored in bigint
Date: 2011-07-15 21:13:05
Message-ID: 718a1e0cf8e0a17b104539aa7fadc462@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> We have a program store into postgres database as UTF-8 format
> i need to convert this value from 634301616478281250 to
> date time format.

You'll have to tell us where you are getting that number from,
and (possibly) what timestamp it should map to. From the size of it,
I would guess it's the number of nanoseconds since some point of time.

The point in time it's coming from may be 1970-01-01, 1900-01-01,
or something else (e.g. 1601-01-01). (Different computer systems
store time differently). If it's the standard Unix epoch (1970)
that corresponds to February 1990, if that helps.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201107151645
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk4grUUACgkQvJuQZxSWSsgiiQCfV64u4quKX7CMGGNccy4TK394
2/QAoLB+ExRqYDJEGdyPxAyVkUa5yOO3
=Rc2q
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message James David Smith 2011-07-15 23:37:24 Re: Datetime stored in bigint
Previous Message dev ss 2011-07-15 19:58:09 Datetime stored in bigint