Asked 2 weeks ago, Updated 2 weeks ago, 1 views

The date on the ORACLE DB is in the form of 202201241201 (YYYYMMDDHHMI) in CHAR format. I'd like to convert this to date format using TO_DATE function in Python's query statement Is there a way to convert the entire column and get it instead of just one specific column?


2022-09-20 11:18

1 Answers

According to document :

SELECT TO_DATE(column1, 'YYYYMMDDHHMI') as column1date
FROM table1;

2022-09-20 11:18

If you have any answers or tips

© 2022 pinfo. All rights reserved.