Date Diff (1 Viewer)

mike60smart

Registered User.
Local time
Today, 19:37
Joined
Aug 6, 2017
Messages
1,906
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.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:37
Joined
Feb 28, 2001
Messages
27,188
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

Top Bottom