- I have a csv file containing dates from 2015-2022 and time in 5 minutes interval date format as 2022-02-18 09:15:00+05:30.
- I need to change date format 2022-02-18 09:15:00+05:30 to 2022-02-18 09:15:00
- So I copied and pasted the data in notepad++ and removed all +05:30 from all rows and replaced in the csv file.
- Format became YYYY-MM-DD HH:MI:SS(2022-02-18 09:15:00) and then imported csv file into oracle table. At the time of import date format is shown as YYYY-MM-DD HH:MI:SS in both and excel file and sql developer.
- But after data imported into table, column values looks like this ‘0014-01-20 15:11:05.000‘.I don’t understand how sql developer assumed date format as.
Tried to find issue with below queries:
- Tried to check the only year values.But year values itself is false in the table.
select to_char(datetime,'YYYY') from indices;
0031
- Tried with NLS_DATE_FORMAT but no use.
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH:MI:SS';
I don’t understand what’s the actual issue is. Can anyone help pls me.