date calculations

A

Anvil22

Can anyone help, I use DOB and I need to calculate the age as of today.

I would appreciate help if possible.
rek
 
M

msnews.microsoft.com

Anvil22 said:
Unfortunately that's what I am having trouble with, working out a correct
formula

Results 1 - 100 of about 17,500 English pages for I use DOB and I need to
calculate the age as of today. (0.45 seconds)

lol

Ever thought of telling it to google?

Third link...
"Access/VBA Tutorials - Calculate a persons age given the DOB"
 
R

raskew via AccessMonster.com

Public Function Age4(DOB As Date) As Integer
Age4 = DateDiff("yyyy", DOB, Date) + (Date < DateSerial(year(Date),
month(DOB), Day(DOB)))
End Function
 
K

Ken Sheridan

Unfortunately that relies on the implementation of Boolean TRUE or FALSE
values as -1 or 0, which is not considered good programming practice as it
assumes the implementation won't change – not necessarily true. Its what the
head of one software company of my acquaintance termed "being unduly chummy
with the implementation".

For a selection of age calculation solutions see:


http://www.mvps.org/access/datetime/date0001.htm


Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top