Enter your email address:

Delivered by FeedBurner



Use your pdf converter to make your pdf files easy! You can now buy software that makes converting pdf to doc possible! Did you know you can even convert pdf to word?
Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!

 


eXTReMe Tracker
  Web http://www.klippert.com



  Sunday, May 15, 2005 – Permalink –

ACCESS




Calculate Age


A few solutions

Here are some methods that have been posted to the newsgroups:

Assuming that the birth date field is called [BDate] and is of type date, you can use the following calculation:

Age:DateDiff("yyyy", [Bdate], Now())+ _
Int( Format(now(), "mmdd")

Alternately you can use this function to calculate age:

Function Age(Bdate, DateToday) As Integer
' Returns the Age in years between 2 dates
' Doesn't handle negative date ranges i.e. Bdate > DateToday

If Month(DateToday) < Month(Bdate) Or (Month(DateToday) = _
Month(Bdate) And Day(DateToday) < Day(Bdate)) Then
Age = Year(DateToday) - Year(Bdate) - 1
Else
Age = Year(DateToday) - Year(Bdate)
End If
End Function



From:
The Access Web (MVPs.org)

Also see:

Support.Microsoft.com:
Two Functions to Calculate Age in Months and Years


Office Tips:
Martin Green
Working out Someone's Age



See all Topics


<Doug Klippert@ 6:35 AM

Comments: Post a Comment

Links to this post:

Create a Link