cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping conversion error in Dates

former_member192238
Participant
0 Kudos

Hello Experts,

I am doing date conversion in Message Mapping from ECC date will come in YYYYMMDD for target i need to convert to YYYY_MM_DD for this i am using date transfer function.Issue is when date is coming like 20110908 it is converting properly like 2011-09-08

But when from ECC date is coming like 00000000 then by default it converting to 0002-11-30 how this date is coming i am not understanding actually it should convert like 0000-00-00 .

Please help me

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

Use standard function DateTrans source format = YYYYMMDD and targer format YYYY'_'MM'_'DD with the single quote which encapsulates the underscore character.

Mickael

Former Member
0 Kudos

Similar discussion :[|]

Regards

Ramesh

Former Member
0 Kudos

Praveen,

Its strange.

I think you have explicitly handle this exception yourself. Add condition if the value is greator than 0 then do the DateTrans

Regards

Ramesh

KennethEriksen
Participant
0 Kudos

Hi,

I am not quite sure why the conversion works like that. That said, the date 0000-00-00 is not a valid date, as that date has never existed. That may be the reason for the strange behaviour by PI.

I suggest you add fixed-values conversion before your dateConvert step in the mapping. Here you check for date 00000000 and map it to e.g. 00010101.

This should solve the issue, if you can live with a result date of 0001-01-01 in these cases.

Br,

Kenneth