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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the Diff2Dates module to calculate age

Status
Not open for further replies.

Compositor

Technical User
Nov 8, 2005
29
0
0
GB
I am using the Diff2Dates code to calculate ages and it is working great. My only problem is that I could really do with being able to calculate an age as of September 1st the current year.

Does anyone know how this is done? Instead of using :

=Diff2Dates("ym",[DOB],Now())

can you change "Now" to just a day and month (eg. 09/01)?

Thanks in advance
 
use search / advanced search in these fora. key words: Age, DOB, AgeASOf, ...



MichaelRed


 
You said, "as of sept 1st, current year", that's 3 criteria?
What's wrong with Date()?

And no, last 2 arguments in DateDiff, must be fully qualified date. ...I assume same with Date2Diff?
 
You wanted this ?
=Diff2Dates("ym",[DOB],DateSerial(Year(Now()),9,1))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top