How to compare past date with current date

1
Hello all I have a employees with there joining date. want to retrieve or check the employee joining date is current date for example if employee join 1/1/2018 and today is 1/1/2023 then condition should get satisfied. How can i do this with retrieve list or with condition. If I checked joining date = currentdate because of year mismatched it won’t get further.  Thanks is advanced
asked
1 answers
2

You can use the XPath constraint:

 

[day-from-dateTime(JoiningDate) = day-from-dateTime('[%CurrentDateTime%]')]
[month-from-dateTime(JoiningDate) = month-from-dateTime('[%CurrentDateTime%]')]

 

More info on XPath dateTime fuctions: https://docs.mendix.com/refguide/xpath-constraint-functions/

 

(Be aware that the day-of-year-from-date function does not work for days after Feb 28th when comparing leap years with non-leap years)

answered