Finding a remainder after division


hi.

 

so i've solved problem it's not elegant. got better way find age (in case on date 1st april 2013) , state in format "00y 00m" (years , months) easy reading?

 

here's solution:

 

trunc((datevalue("1/9/13") - 'dob') / 365.24) & "y " & trunc(12 * (((datevalue("1/9/13") - 'dob') / 365.24) - trunc(((datevalue("1/9/13") - 'dob') / 365.24)))) & "m"

 

...where 'dob' field name containing datevalue (the person's date of birth).

 

i couldn't find 'modulus' function, or "\" (remainder rather divide "/") operator or neat way sub-calculation... perhaps need one?

 

thanks.

this doesn't seem has formscentral. application doing coding in?



More discussions in Archived Spaces


adobe

Comments

Popular posts from this blog

2.5.28 to 3.4.1---Download of update package failed - Joomla! Forum - community, help and support

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support