datedif between start date and today

L

Lawrence

I'm using access 2000 and need to see the days, months and years between a
start date enterd in a field and todays date and have the answer appear in a
text box called worked. The formula I've tried is in the contorl source of
worked.
=DATEDIF([Start date],date(),"y") & " years, " & DATEDIF([Start
date],date(),"ym") & "
months, " & DATEDIF([Start date],date(),"md") & " days"
But all I get is name?. Please help
 
D

Douglas J. Steele

The name of the function is DateDiff, not DateDif, and the syntax is

DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])

Note, though, that interval is a single interval: you can't combine ym or md
as you're trying to do.

However, it sounds like you may want the "A More Complete DateDiff Function"
that Graham Seach & I developed. See
http://www.accessmvp.com/DJSteele/Diff2Dates.html
 
Top