cancel
Showing results for 
Search instead for 
Did you mean: 

DateTrans Mapping Error

markbernabe
Active Participant
0 Kudos

Hi,

I'm using DateTrans function to convert the date from MDM to a format that is acceptable by our receiver system. The format in MDM is mm/dd/yyyy hh:mm:ss GMT and the expected output is mm/dd/yyyy hh:mm

So basically, the mapping just needs to remove the seconds and GMT part of the date.

However, for some reason, the mapping is failing and producing a different value than the source.

Here's the actual mapping:

Did I miss something? Appreciate your inputs regarding this. Thanks a lot!

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Mark,

Maybe im confused but you said that your format is mm/dd/yyyy but you have in datetrans function dd/MM/yyyy, months and days are interchanged. The system i think is adding 12 months in your result because it is expecting 16 months,  16 - 12 = a year and four months.

Regards.

markbernabe
Active Participant
0 Kudos

Hi Inaki,

My fault! Was obviously working late last night. Thanks for spotting this stupid error of mine!

Answers (2)

Answers (2)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

did you try to make a substring? I dont replicate your issue rigth now, i just thinking.

i will try replicate it later. i am in a meeting now.

Best Regards

Rodrigo

markbernabe
Active Participant
0 Kudos

To add, it's not really failing all the time though there are more cases of erroneous dates than correct ones. Here's a screenshot wherein the mapping worked for 1 date while it failed on the other one. Btw, we're using 7.3 EHP1.

former_member184789
Active Contributor
0 Kudos

Hi Mark,

In the Date transformation, you have specified input data  in format dd/mm/yyyy, whereas the first two values in the above test data are 08/16/2013 which is not possible since a month cannot be 16. Either this test is carried out with incorrect data or you might have to specify input in format of mm/dd/yyyy instead of dd/mm/yyyy.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Mark,

                  Could you try substring function instead as shown below

The result

Regards

Anupam