Calculates the work date that is before or after a start date, as specified by a number of days. You can also specify which days of the week are working days and a list of holidays via parameters.

workdayintl(StartDate, 5,'0000001')

Output: Returns the working date that is five days after the StartDate, assuming that every day except for Sunday is a working day.

workdayintl(date1,numDays[,str_workingdays][,array_holiday])


ArgumentRequired?Data TypeDescription
date1YdatetimeStarting date to compare
numDaysYintegerNumber of days before or after starting date
str_workingdaysNstring

Seven-character string identifying the weekend days.

array_holidayNarrayAn array of string values representing the valid dates of holidays.

date1

Date value can be a column reference or output of the DATE function or the TIME function.

Required?Data TypeExample Value
YesDatetime (Column reference or date output of DATE or TIME function)LastContactDate

numDays

An Integer that defines the number of working days distance from the start date. The function returns the start date plus or minus the number of working days represented in this Integer.

If the integer is less than zero, the number of working days are counted backward from the start date.

Required?Data TypeExample Value
Yesinteger10

str_workingdays

A seven-character string identifying the days of the week that are working days.

Examples:

str_workingdaysWeekend days
'0000011'Saturday and Sunday (default)
'1000011'Monday, Saturday, and Sunday
'0000000'None.


Required?Data TypeExample Value
YesArray['1000011']

array_holiday

An array containing the list of holidays, which are factored in the calculation of working days.

Values in the array must be in either of the following formats:

['2020-12-24','2020-12-25']
['2020/12/24','2020/12/25']

Required?Data TypeExample Value
YesArray['2018-12-24','2018-12-25','2018-12-31','2019-01-01']

Example - Date diffing functions