Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

date calculations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anvil22 - 17 Jan 2008 05:50 GMT
Can anyone help, I use DOB and I need to calculate the age as of today.

I would appreciate help if possible.
rek
msnews.microsoft.com - 17 Jan 2008 06:04 GMT
> Can anyone help, I use DOB and I need to calculate the age as of today.

Easy. Just use a formula.
Anvil22 - 17 Jan 2008 06:13 GMT
Unfortunately that's what I am having trouble with, working out a correct
formula

> > Can anyone help, I use DOB and I need to calculate the age as of today.
>
> Easy. Just use a formula.
msnews.microsoft.com - 17 Jan 2008 06:28 GMT
> Unfortunately that's what I am having trouble with, working out a correct
> formula
>
>> > Can anyone help, I use DOB and I need to calculate the age as of today.
>>
>> Easy. Just use a 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"
raskew - 17 Jan 2008 06:28 GMT
Public Function Age4(DOB As Date) As Integer
    Age4 = DateDiff("yyyy", DOB, Date) + (Date < DateSerial(year(Date),
month(DOB), Day(DOB)))
End Function

>Unfortunately that's what I am having trouble with, working out a correct
>formula
>
>> > Can anyone help, I use DOB and I need to calculate the age as of today.
>>
>> Easy. Just use a formula.
Ken Sheridan - 17 Jan 2008 18:19 GMT
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

> Public Function Age4(DOB As Date) As Integer
>      Age4 = DateDiff("yyyy", DOB, Date) + (Date < DateSerial(year(Date),
[quoted text clipped - 7 lines]
> >>
> >> Easy. Just use a formula.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.