Date Diff Question

Now is returning "5/22/2009 1:46:26 PM"
StartDateHold  contains "5/30/2009"

DateDiff(DateInterval.Day, Now(), CDate(StartDateHold))
The statement is returning 7. Why is not returning 8?? What am I missing??

Does datediff not count holidays?? Monday is memorial day.

Is it because the number of days between the two dates is 7? If so is that really the difference? I thought difference was the result of a subtraction. oi vey!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


You need to remove the time part from Now, otherwise you will only get 8 if StartDateHold also contains a time part >= than the time part from now.

You can use this:

DateDiff(DateInterval.Day, Now().Date, CDate(StartDateHold))

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thefarmAuthor Commented:
Beats ahving to add 1 all over the palce. Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.