Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access form calculate dob

Status
Not open for further replies.

user222

Technical User
Nov 11, 2005
5
GB
trying to calculate DOB with no decimal place but its showing the decimal places. can anyone help?

using

=((Now())-([DOB]))/364
 
thanx for the help jk10 worked a treat!
 

How come you two, have 364 days in every year?

DateDiff("d", "2006-01-01", "2007-01-01") = 365
DateDiff("d", "2004-01-01", "2005-01-01") = 366
 
If you're trying to compute an age in years then you need something like
Code:
Age = DateDiff("yyyy", dd, Date) + _
      ((Format(dd, "mmdd") > Format(Date, "mmdd")))

Something like

Int((#05/25/2006# - #05/26/2000#) / 364) = 6

but the correct age is 5.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top