Date Difference Code Help Needed

D

Dave

Tried the below, it didn't work

=DateDiff("d",CDate(Nz([Work Date],0)),CDate(Nz([Work Date],0)))


On my form there is a control name Work Date which shows the date the work
was done.
The form, named Time and Hours has many records with same or different
dates.
The Text Box Text98 is located in the Form Footer.

I need the difference between the oldest and newest dates on this form, not
Date().
i.e. There are (Blank Days)(Number) difference between your dates

Thanks,

Dave
 
D

Douglas J. Steele

You're calculating the difference between the same value. What do you expect
to get?

Try using DMin and DMax on the table where the dates are stored, and using
that in your DateDiff calculation.
 

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

Top