Age calculatoion Function (1 Viewer)

But i want years with months
If less than year returned months only

The devil is in the edges. The most granular calendar unit is the day--every other unit can be expressed in days...but not consistently. Months come with 28,29,30 & 31 days. Years come with 365 & 366 days. Exactly where and how do you want to draw your line?

Born July 1. Today is August 31. They are 62 days old. How many months you do expect returned? What exact date does it switch from 1 month to 2 months? What exact date does it switch from 2 months to 3 months?

Born January 31. Today is March 1. They are 29 days old. How many months do you expect returned? What exact date does it switch from 0 months to 1 month? What exact date does it switch from 1 month to 2 months?
 
See also my article which has a wide variety of age functions depending on your requirements:
 

Users who are viewing this thread

Back
Top Bottom