Hi, how to get age automatically by clicking on Date of birth

0
how to get age automatically by clicking on Date of birth
asked
3 answers
0

Create a helper entity (let’s call this AgeCalculator) with DateTime attribute DateOfBirth and show it in a data view. Add a datetime picker widget to select your date of birth. Trigger a microflow using an on change event on the datetime picker. In that microflow you can calculate your age by using the between date function call “calendarYearsBetween” where you put in CurrentDateTime and DateOfBirth:

calendarYearsBetween([%CurrentDateTime%], $AgeCalculator/DateOfBirth) 

answered
0

Create a button with a microflow and use the community commons YearsBetween function to calculate the years between the Date of birth and the current date.

Regards,

Ronald

 

answered
0

Hey Swapna,

As Ronald said, you can  use calendaryearsbetween function,

You can get to know about it in the document from the link below,

https://docs.mendix.com/refguide/between-date-function-calls/#9-calendaryearsbetween

Hope it helps!

answered