Hello everyone,
I am getting Date from my internal application (Ex: 12/31/2014), here i want to compare this date with current system date, is the application date is completed 5 years or not.
Any one please help me.
You essentially want to calculate the difference between dates and check if that is more than 5 years (in days)
This may help - Check Dates
Try this!!
- YourDateVariable = YourDateVariable.addYears(5)
- Check YourDateVariable < datetime.now according to ur case .
- if True , it means 5 years completed , if false it means 5 years not completed .
1 Like