Date Comparission

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!!

  1. YourDateVariable = YourDateVariable.addYears(5)
  2. Check YourDateVariable < datetime.now according to ur case .
  3. if True , it means 5 years completed , if false it means 5 years not completed .
1 Like