ahannah
asked on
Outlook Custom Forms - date calculation
Hi,
I have created a custom form based on Contacts in Outlook 2003. It has 2 fileds, a rexceived and responded date/time. I want to calculate the lapsed time in hours but I want to EXCLUDE weekends and bank holidays. The formula below is fine to calculate the elapsed house but how would I exclude weekends/holidays Thnks very musc. Andy
IIf(DateDiff("h",[Date Received],[Respond Date])<0,"In Progress",DateDiff("h",[Da te Received],[Respond Date]))
I have created a custom form based on Contacts in Outlook 2003. It has 2 fileds, a rexceived and responded date/time. I want to calculate the lapsed time in hours but I want to EXCLUDE weekends and bank holidays. The formula below is fine to calculate the elapsed house but how would I exclude weekends/holidays Thnks very musc. Andy
IIf(DateDiff("h",[Date Received],[Respond Date])<0,"In Progress",DateDiff("h",[Da
ASKER
Hi BlueDevil fan,
Still not clear how this would exclude the weekends from the date calculation
Andy
Still not clear how this would exclude the weekends from the date calculation
Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot, it worked.
You're welcome.
Use a nested IIF. Something like this
IIf(Weekday(Date) <> vbSaturday And Weekday(Date) <> vbSunday,Code_for_Weekdays