Calculate age in total months only

L

Lexy

Hi

I'd like to show the age in total months (i.e. if 2 years old, the result
would be 24) in a query field, based on a Birth Date being keyed into a base
Table by the user.

Can you help please?
 
L

Lexy

Cheers Karl

Have tried this as you suggest and even though we haven't reached the 26th
April as yet (birth date is 26th Sept '08 for instance), it's rounding up to
7 months. Is there any way to return an exact figure, a decimal of 6.9
months for instance?

Lexy

KARL DEWEY said:
Months Old: DateDiff("m", [DOB], Date())

Lexy said:
Hi

I'd like to show the age in total months (i.e. if 2 years old, the result
would be 24) in a query field, based on a Birth Date being keyed into a base
Table by the user.

Can you help please?
 
K

KARL DEWEY

Well closer would be DateDiff "w" and divide by 4.5 as there is
approximately 4.5 weeks to a month.

Lexy said:
Cheers Karl

Have tried this as you suggest and even though we haven't reached the 26th
April as yet (birth date is 26th Sept '08 for instance), it's rounding up to
7 months. Is there any way to return an exact figure, a decimal of 6.9
months for instance?

Lexy

KARL DEWEY said:
Months Old: DateDiff("m", [DOB], Date())

Lexy said:
Hi

I'd like to show the age in total months (i.e. if 2 years old, the result
would be 24) in a query field, based on a Birth Date being keyed into a base
Table by the user.

Can you help please?
 
J

John W. Vinson

Hi

I'd like to show the age in total months (i.e. if 2 years old, the result
would be 24) in a query field, based on a Birth Date being keyed into a base
Table by the user.

Can you help please?

DateDiff("m", [DOB], Date())

will count month boundaries (i.e. if DOB is #3/31/2009# this will return 1
month old on #4/1/2009#).
 
Top