datedif between start date and today

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top