dbTalk Databases Forums  

Re: Calculating a person's age

comp.database.ms-access comp.database.ms-access


Discuss Re: Calculating a person's age in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Calculating a person's age - 08-01-2003 , 03:50 PM






John:
this gives the number of months:
mnth = DateDiff("m", dob, Date)
if you want years and months
yrs = mnth / 12 - 0.5
mnths = mnth mod 12

Good Luck
Ira Solomon

On 1 Aug 2003 05:24:36 -0700, fishezuk (AT) btopenworld (DOT) com (FishezUk)
wrote:

Quote:
Hi

Can anybody help me please! I am trying to create a student records
database. I have a (short date) column with the date of birth and am
looking for anyone who can help me to create a column with their age
in months and years.

Any ideas/possibilities greatfully received.

Thanks

John


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.