Add 10 days to a particular date

How to implement the scenario: Add 10 days to a particular date in Datastage PX

Questions by vivo7000

Showing Answers 1 - 2 of 2 Answers

extract the day part of the date by using the string function and then add how many days u want and then again add all those parts into single string and then convert the string into date object.

  Was this answer useful?  Yes

Venkatesh Mekewar

  • May 31st, 2016
 

You can use Date function named "DateFromDaySince()" present inbuilt in Datastage.
Example: Consider Link.DaystoAdd contains 10 and Link.GivenDate contains 2016-10-31. Following function will return
DateFromDaysSince(Link.DaystoAdd,Link.GivenDate)= 2016-11-10
same can be obtained by ---> DateFromDaysSince(Link.DaystoAdd,2016-10-31)= 2016-11-10
and
DateFromDaysSince(10,Link.GivenDate)= 2016-11-10
If integer value is negative then that much days are get reduced from the specified date.
DateFromDaysSince(-10,2016-11-10)= 2016-10-31

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions