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?
rettiseertConnect With a Mentor Commented:

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))
thefarmAuthor Commented:
Beats ahving to add 1 all over the palce. Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.