How to compare Years from the date (excluding everything else)

0
I have two objects with different date attributes. I need to check if the year is the same for both objects, (I don’t need to compare days, months, minutes, etc., only years). How can I do it in a microflow?
asked
3 answers
2

 

use trimtoyears/trimtoyearsutc function on both dates in mendix to compare years of date

answered
2

Like Abhishek said, use trimToYears[UTC] to compare two objects; or use formatDateTime[UTC]($date,'yyyy') to convert it to a String.

answered
0

Depending on your use case, Java action GetIntFromDateTime in Community Commons could be helpful.

answered