cancel
Showing results for 
Search instead for 
Did you mean: 

Date logic requirement

AbdulHammed
Explorer
0 Kudos

Hi Experts,

My scenario is File to proxy. the requirement is if the start date of source field is within next 30 days i need to populate that date field at target side other wise need to rise an exception.

Can any one please help me on this...

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Abdul,

You can control it inside a UDF in a message mapping.

This blog could help you to throw the exception Throwing Smart Exceptions in XI Graphical Mapping | SCN

For date comparation, you can add 30 days to current date (http://stackoverflow.com/questions/11727933/add-30-days-to-date-in-java) and compare it with the field date (http://stackoverflow.com/questions/2592501/how-to-compare-dates-in-java)

Hope this helps.

Regards.

apu_das2
Active Contributor
0 Kudos

Just write a simple UDF and get true / false accordingly in day is within 30 days or not and map with create If in graphical mapping.

Follow this URL-

How to calculate date and time difference in Java

Thanks,

Apu