Can somebody help me on How to automatically compute the age field once birthdate field is filled up? in Microsoft Dynamics NAV 2013.
when the vendor filled up the birthdate, then the age will be computed automatically.
Thanks in advance!!!
I have been using this function for years:
[CODE]FUNCTION CalcAge(BirthDate : Date) : Integer
// Returns number of years old - Takes leap years into account
IF BirthDate = 0D THEN
EXIT(ROUND((TODAY - BirthDate)/365.2364,1,’<’)); [/CODE]
I got it. thanks to your post. but I did this in message box only! how can I automatically computed it to the field? thanks in advance.
you need to assign the values which have been calculated.
Like Age :=25