Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Data Loader - Unload to XML file Assigns TIMESTAMP formatting to DATE Column

User_3FR4FOct 14 2022

as above. I'm working on transferring tables to another Apex Implementation that will have the same data, and I ran into the above formatting problems. Columns with DATE formatting export into XML as format:
YYYY"-"MM"-"DD"T"HH24":"MI":"SS"."FF3

DATE format columns do not use fractional seconds, and I receive error:
ORA-01821: date format not recognized

I diagnosed with:
select
to_char(to_timestamp('2015-10-26T00:00:00.000','YYYY"-"MM"-"DD"T"HH24":"MI":"SS"."FF3')),
to_date(replace('2015-10-26T00:00:00.000', '.000'), 'YYYY"-"MM"-"DD"T"HH24":"MI":"SS')
from DUAL

The Apex implementation I have fails on txt export, so I cannot export as a delimited file to edit away the fractional seconds.
I have used a find & replace command in a text editor within the XML doc, and that improved my success rate, but it still failed on 1/5 of entries in the table to error:
ORA-01843: not a valid month

with no row indicated as the culprit. All DATE rows on import looked something like:
2020-12-14T00:00:00

Looking through the $ERR table does not show me anything that should have a failed a data import. All Dates seem to have translated fine after the XML edit
Anyone know of a cleaner workaround? is this a known issue?

Comments
Post Details
Added on Oct 14 2022
1 comment
352 views