Date calculations are not that difficult, for FM a date is a number.
Just don-t use the 'Today', but the Get(CurrentDate) function.
Get(CurrentDate) - date of birth will give you the days between those two dates.
This will give you the days 'between', so you will have to add 1 day for an 'age', depend how your definition for age is.
To get the weeks you have to devide by 7 (7 days in a week)
This will give you a clumsy number x,yyyy.
So, we take the integer in one field and the modulo in an other field:
Int((Get(CurrentDate)-date of birth)/7)for the rest days and
Mod( (Get(CurrentDate - date date of birth), 7)for the week(s)
Play with the +1 to get close to your definition of age and make sure the calculation result is number, unstored.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.