subBusinessDays

Modified on Tue, 22 Aug 2023

Description

Use this function to subtract the specified number of business days (Monday to Friday) from the given date, ignoring weekends.

Syntax

subBusinessDays(date, number)

Returns

Return ValueDescription
DateReturns the resulting date after subtracting the specified number of business days.

Sample

ExampleResultDescription
subBusinessDays (2023-04-08, 5)2023-03-31 (a Friday)Returns the output as 2023-03-31, which is a Friday, after subtracting 5 business days from the input date (2023-04-08).

To view all the Date functions, click here.

See Also