Hi Akshay,
you can compare dates be formating it
formatDateTime($variable,'dd/MM/yyyy')=formatDateTime('[%CurrentDateTime%]','dd/MM/yyyy')
In an OQL-statement you can get someone’s current age using:
from "Sales.Customer" where DATEDIFF(YEAR, Birthday,'[%CurrentDateTime%]') >= 18
select FirstName, DATEDIFF(YEAR, Birthday,'[%CurrentDateTime%]');
Hoping there is a better way to do this in microflows (without jumping to java), but this is what I ahv got so far:
$BirthdayStillToComeThis Year:
parseInteger(formatDateTime([%CurrentDateTime%],'MMddHHmmss'))<
parseInteger(formatDateTime($Person/Birthdate,'MMddHHmmss'))
$CurrentAge:
parseInteger(formatDateTime([%CurrentDateTime%],'yyyy'))-parseInteger(formatDateTime($Person/Birthdate,'yyyy'))-
(if($BirthdayStillToComeThisYear)then 1 else 0)
Copy the solution from Marketplace module Person: https://marketplace.mendix.com/link/component/116181