Reputation: 3
I have data in a column of string type value.
For example : string value : 20201123043000
i need to get timestamp value : 2020-11-23 04:30:00
How can i write sql query to get above timestamp. Thanks
Upvotes: 0
Views: 290
Reputation: 65228
You can use TO_TIMESTAMP
function
SELECT TO_TIMESTAMP('20201123043000','YYYYMMDDHHMISS');
Upvotes: 2