ANJUS253 Member since 2015 7 posts
Cognizant Technology Solutions
Posted: 1 year ago
Last activity: 1 year 5 months ago

Add 3 years to existing date

Hi All,

I have a requirement to display a date by adding 3 years to a date entered by user. For example, if user enters 28th Feb 2015, then 28th Feb 2018 should get populated. Issue with addDate function is that it doesn't seem to work when it comes to adding days to a leap year. If we add 3 years to 29th Feb 2016 then the added date is displayed as 01st March 2019 but its supposed to be 28th Feb 2019. Can anybody suggest a solution to this? is there any other function to serve this purpose?

Thanks in Advance!

***Edited by Moderator Marissa to update platform capability tags****

Low-Code App Development Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn