How to add year in a date and compare with current date
I have requirement like i have to fetch the date of a transaction from DB table in which I have to add certain year(eg: 7 yrs.) in activity and then compare it with current date (eg: Currentdate>transaction+7yrs) and based on that comparision I have to update the status of that transaction..
ow to add year in a date and compare it with current date.
You can refer to the below link which explains how to add number of days to a date (in the same way you can either add years to the date or you can convert the year count to no of days and then add the same):