Help with Business Days (1 Viewer)

cooh23

Registered User.
Local time
Today, 11:50
Joined
Dec 5, 2007
Messages
169
Good Afternoon All,

I am in need of you help in calculating this. Basically, I don't want the code to count zero. For example, today is 3/19/2008 - Date() should equal = 1 and not zero..

Here's some more examples:[lastfollowup] being 3/18/08
Date() - [LastFollowup] = 2

Here's my code:
Code:
DaysOpen: ((DateDiff("d",[LastFollowup],Date(),2))-(Int(DateDiff("d",[LastFollowup],Date(),2)/7))*2)+IIf(Weekday(Date(),2)>5,5-Weekday(Date(),2),0)+IIf(Weekday([LastFollowup],2)=6,1,0)-IIf(Weekday([LastFollowup],2)>Weekday(Date(),2),2,0)

Thank you,

John
 

mresann

Registered User.
Local time
Today, 11:50
Joined
Jan 11, 2005
Messages
357
Try this:

DateDiff("d", MyEarlierDate, MyLaterDate) + 1

NOTE: if the days are the same, then the answer will be 1.
 

Users who are viewing this thread

Top Bottom