Re: Datetime stored in bigint - Mailing list pgsql-novice

From Greg Sabino Mullane
Subject Re: Datetime stored in bigint
Date
Msg-id 718a1e0cf8e0a17b104539aa7fadc462@biglumber.com
Whole thread Raw
In response to Datetime stored in bigint  (dev ss <ssdev938@gmail.com>)
Responses Re: Datetime stored in bigint  (James David Smith <james.david.smith@gmail.com>)
List 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@turnstep.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-----



pgsql-novice by date:

Previous
From: dev ss
Date:
Subject: Datetime stored in bigint
Next
From: James David Smith
Date:
Subject: Re: Datetime stored in bigint