How to insert "29-SEP-22 12.00.17.225 AM" in PostgreSQL DB ?
In Oracle Table,
"29-SEP-22 12.00.17.225 AM"
In PostgreSQL Table , ??
How to capture above date format in PostgreSQL table ? what will be the datatype PostgreSQL side ?
CodePudding user response:
The data type would be timestamp
. Use to_timestamp
with format specification dd-mon-yy hh12.mi.ss.ms pm
.
Example:
select to_timestamp('29-SEP-22 12.00.17.225 AM', 'dd-mon-yy hh12.mi.ss.ms pm');