Originally posted by xander
I know how to use code to do this but is there an expression you can use in a report to work out the number of working days between two dates?
I basically want to replicate the "WORKDAY" function from excel.
Any ideas much appreciated!
Check out the Weekday function. You can use it in a procedure and exclude vbSunday (1) and vbSaturday (7) to count working days.
From the Help Files:
Returns a Variant (Integer) containing a whole number representing the day of the week.
The Weekday function syntax has these named arguments:
date Required. Variant, numeric expression, string expression, or any combination, that can represent a date. If date contains Null, Null is returned.
firstdayofweek Optional. A constant that specifies the first day of the week. If not specified, vbSunday is assumed.