434,930 Members | 1,383 Online
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

# calculation of up to date age in terms of year/moth/days

 P: 17 Dear freinds, I need date difference in terms of years/months/days i.e. i want to create a calculated field to show the age of person in year months and days. The DateDiff() expression of MS Access calculates the age in years only and do not show the month and days. Will you please help me thanks a lot in advance Sep 8 '06 #1
5 Replies

 Expert Mod 10K+ P: 14,534 DateDiff will calculate whatever you want days, months or years. See following examples DateRange = DateDiff("yyyy", #10/15/1998#, #11/22/2003#) 'would return 5 DateRange = DateDiff("m", #10/15/2003#, #11/22/2003#) 'would return 1 DateRange = DateDiff("d", #10/15/2003#, #11/22/2003#) 'would return 38 Dear freinds, I need date difference in terms of years/months/days i.e. i want to create a calculated field to show the age of person in year months and days. The DateDiff() expression of MS Access calculates the age in years only and do not show the month and days. Will you please help me thanks a lot in advance Sep 8 '06 #2

 Expert 100+ P: 1,418 Try the following: Mid(Format(Now()-Cvdate("08/04/1980")-1,"yyyy/mm/dd"),3,len(Format(Now()-Cvdate("23/03/1980")-1,"yyyy/mm/dd"))) Sep 8 '06 #3

 Expert 100+ P: 1,418 With Format you can also calculate the hours and minutes of the difference! ;) Sep 8 '06 #4

 P: 20 I use the following and have had no problems. DateDiff("yyyy",tbl.DOB,tbl.Date)+Int(Format(tbl.D ate,"mmdd")

 P: 3 for "year and month and day" ??? please Jan 11 '17 #6