Workday
Adds a specified number of workdays to a date.
Variants
- Workday(Date start, Numeric days)
- Workday(Date start, Duration days)
- Workday(Date start, Numeric days, Text weekends)
- Workday(Date start, Duration days, Text weekends)
Workday(Date start, Numeric days)
Adds the numeric value of workdays to a start date.
Parameters
- start
- The date to start.
- days
- The numeric value of workdays.
Returns
Date
Remarks
Weekends are calculated and subtracted based on the "Weekends" property value from database properties (with Saturday and Sunday as the default weekend).
Examples
Workday(#2015-08-12#, 5)
results in #2015-08-19#.
Workday(Date start, Duration days)
Adds the duration value of workdays to a start date.
Parameters
- start
- The date to start.
- days
- The duration value of workdays.
Returns
Date
Remarks
Weekends are calculated and subtracted based on the "Weekends" property value from database properties (with Saturday and Sunday as the default weekend).
Examples
Workday(#2015-08-12#, 5d)
results in #2015-08-19#.
Workday(Date start, Numeric days, Text weekends)
Adds a specified number of workdays to a start date, considering the weekends specified by the third argument.
Parameters
- start
- The date to start.
- days
- The numeric value of workdays.
- weekends
- The Weekends argument is a string specifying either one or two digits in a 1…7 range to specify the first and second weekends starting from Monday (1) to Sunday (7), or a "bitmap" consisting of exactly seven zeroes and ones, indicating whether the day is a weekend (1) or not (0). For example, classic Saturday-Sunday weekends can be represented as either "67" or "0000011".
Returns
Date
Examples
Workday(#2015-08-12#, 5, "67")
results in #2015-08-19#.
Workday(Date start, Duration days, Text weekends)
Adds a specified duration of workdays to a start date, considering the weekends specified by the third argument.
Parameters
- start
- The date to start.
- days
- The duration value of workdays.
- weekends
- The Weekends argument is a string specifying either one or two digits in a 1…7 range to specify the first and second weekends starting from Monday (1) to Sunday (7), or a "bitmap" consisting of exactly seven zeroes and ones, indicating whether the day is a weekend (1) or not (0). For example, classic Saturday-Sunday weekends can be represented as either "67" or "0000011".
Returns
Date
Examples
Workday(#2015-08-12#, 5d, "0000011")
results in #2015-08-19#.