Hi Ron,
I appreciate your response.
select to_timestamp((( start_time::numeric (20, 11)) - 25567.0 ) * 86400) FROM bronx.test_part_details_all_mcmz_4_cols limit 24
When I try the above, I am getting a difference of 2 days.
1 day could be due leap year 1900 discrepancy but I am unable to figure out the additional 1 day difference.
Thanks, Sarwar From: Ron <ronljohnsonjr@xxxxxxxxx>
Sent: Friday, June 16, 2023 1:14 AM To: pgsql-admin@xxxxxxxxxxxxxxxxxxxx <pgsql-admin@xxxxxxxxxxxxxxxxxxxx> Subject: Re: Conversion from Number to Date Try using the epoch "1 Jan 1900". An offset of 25567.0 should adjust the date by 70 years.
postgres=# SELECT to_timestamp((44795.731708-25567.0)*86400); to_timestamp ----------------------------- 2022-08-24 12:33:39.5712-05 (1 row) You'll have to jigger with time zones yourself. On 6/15/23 23:53, M Sarwar wrote:
--
Born in Arizona, moved to Babylonia. |