Reputation: 86
I have a column with where dateTime stamp is present. Want to extract the value of the hour in 24 hours format while the time value stored in the field is in 12 Hours format, in AM and PM.
Upvotes: 1
Views: 2839
Reputation: 64
Maybe, You use the function to_char and set the parameter yyyy-mm-dd hh24:mi:ss
.
Check this query:
SELECT TO_CHAR(column_name, 'yyyy-mm-dd hh24:mi:ss') FROM table_name;
Upvotes: 2