cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Date format from YYYYMMDD to MM/DD/YYYY --issue with Mapping

Former Member
0 Kudos

Hi All ,

I have IDOC(DESADV.DELVRY03-> file ) scenario which i am working on . While debugging noticed that the field :

E1EDT13\NATNZ -Data Transformation(from yyyymmdd to mm/dd/yyyy)-Target .This works

But say if IDOC doesn't pass any value (For Good's issue) I get Error during debugging : RuntimeException in Message-Mapping transformation: Unparseable date: ""

I did check thsi blog : but this is about the Data Transformtaion.

I tried using constants , create if , -these function doesn't work /not applicle in this case

Could you please provide inputs as to how to handle two condition :

1. With date -- then transform

2.Else , pass nothing

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi,

You can use the check

If length equals 8

then transform the date and pass to output.

else

do not create the date (Or you can pass some dummy date depend on your condition)

Thanks

Harish

Former Member
0 Kudos

Hi All,

Thank you so much for your instant reply .

Harish simple solution worked .

Yes you right .This solution works for all creteria !

NATNF(field of Date) equals(Text) =8 , If then (Data Transformation yyyymmdd to MM/DD/YYYY) - Target works!

Best Regards,

Varalakshmi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi VaraLakshmi,

This requirement cannot be achieved through Standard Graphical Mapping. You need to write a UDF for it. The Logic should be like to check the field value (i.e date) else should send an empty value.

Thanks,

former_member750652
Contributor
0 Kudos

Hi Varalakshmi,

Plese try to use UDF for date conversion and include logic which would check the Space value from the source structure.

so if there is space return as such

else.

perform the conversion logic.

(The conversion logic has been provided by micheal in the thread you have provided in the query)

Thanks,

Ram.