Posted: Thu May 08, 2014 1:53 am Post subject: IBM IIB-Date format conversion in Mapping file
Apprentice
Joined: 08 May 2014 Posts: 35
Need some help on date format conversion in mapping files.
We are trying to read a fixed length file with the help of DFDL and push the data into some table with a mapping file.
The DFDL reads the date elements correctly from the file correctly.
The issue comes when we are trying to insert the same into ORACLE database column with type date.
It gives the below error :
ORA-01861: literal does not match format string
(Element in DFDL and DB column are both set to date)
Also, we are using the current date time function for one of the date column which works perfectly. Below is the format in which it is getting stored :
5/8/2014 5:53:24 AM
And if we store the date coming from DFDL element in some string column it is getting stored as :
2014-02-01T00:00:00.000
Last edited by ajayrana on Tue May 27, 2014 10:29 pm; edited 1 time in total
Did you set the elements to be represented by their types?
Looks like your date is not in broker default time format but rather in ISO datetime format... Make sure it is effectively represented either in a broker date format or broker TIMESTAMP.
May be you need to reformat before passing to Oracle...
try xs:datetime in the mapping instead of convert (which does not seem to work for dates).
we have the same issue going from a cobol copy book to a .net input object, and found that for straight dates that are CCYY-MM-DD that xs:date works without a hitch.
Thanks for the reply !! it seems the issue was with one of the DFDL date elements. I created the that section of the DFDL again and it started working.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum