Date Diff

mike60smart

Registered User.
Local time
Today, 21:53
Joined
Aug 6, 2017
Messages
2,142
Hi Everyone

I need to calculate the number of Days between 2 dates.

StartDate and TermDate

I know how to use the DateDiff Function

=DateDiff("d",[StartDate],[TermDate])

How would I cater for the TermDate being Black and If it is Blank then use the Current Date.
Any help appreciated.
 
First, always put the later date first in DateDiff unless it is OK to come out with negative numbers.

Second, this would also work: = FIX( NZ( [TermDate], Date() ) - NZ( [StartDate], Date() ) )

And my usage also shows you how to use NZ and the current date.
 

Users who are viewing this thread

Back
Top Bottom