Calculate between 2 dates with an added alternative (1 Viewer)

djdave007

New member
Local time
Today, 07:34
Joined
Jul 7, 2009
Messages
1
Hi,
I've been trying to find the answer as I'm sure it's already here. Can I please have support on the following; either a link or direct information.

I am creating a db and within it the user would add a 'created date', and later in a separate field a 'closed date'.
What I am trying to track is the number of days between these days (which I can do), plus in addition.. IF the 'closed date' has not been completed i.e. issue is still open, then the calculation is from the 'created date' until TODAY's date (date()), and continues to run until a date is actually inputted.

This is pickling my small brain!

Your help is greatly appreciated.

Thanks in advance
 

bob fitz

AWF VIP
Local time
Today, 07:34
Joined
May 23, 2011
Messages
4,717
Something like:
iif(IsDate([Close Date]),DateDiff("d",[created date],[Close Date]),DateDiff("d",[created date],Date())
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:34
Joined
Oct 29, 2018
Messages
21,358
Hi. Welcome to AWF!

You could try something like:

Code:
DateDiff("d", [CreatedDate], Nz([ClosedDate], Date()))
 

Users who are viewing this thread

Top Bottom