From: | M Sarwar <sarwarmd02(at)outlook(dot)com> |
---|---|
To: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Conversion from Number to Date |
Date: | 2023-06-16 02:23:27 |
Message-ID: | PH7PR19MB59686176B5B56B8FE3876939D358A@PH7PR19MB5968.namprd19.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hello,
Environment:
AWS / RDS
Postgres 13.7
Column formats:
START_TIME CHARACTER VARYING(20) COLLATE PG_CATALOG."DEFAULT",
STOP_TIME CHARACTER VARYING(20) COLLATE PG_CATALOG."DEFAULT",
SQL:-
select
TEST_PART_DET_ALL_MCM_ID,
START_TIME, STOP_TIME,
START_TIME::numeric (20, 11), STOP_TIME::numeric (20, 11)
from BRONX.TEST_PART_DETAILS_ALL_MCM
limit 3
;
Output:
478 "44795.7306776851" "44795.731708" 44795.73067768510 44795.73170800000
479 "44795.58143" "44795.58246" 44795.58143000000 44795.58246000000
480 "44795.5714184259" "44795.572495" 44795.57141842590 44795.57249500000
During the data load from CSV files to the database, the above START_TIME and STOP_TIME date column data arrived as number value.
Now I need to translate the START_TIME and STOP_TIME back to DATE format.
I am unable to find any documentation or help from the internet.
Does it make sense or did I mess up something?
Thanks,
Sarwar
Working late night of EST
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2023-06-16 02:29:59 | Re: Conversion from Number to Date |
Previous Message | M Sarwar | 2023-06-15 22:50:12 | Re: The same result for with SPACE and without SPACE |