subWeeks

Modified on Tue, 22 Aug 2023

Description

Use this function to subtract the specified number of weeks from the given date.

Syntax

subWeeks(date, number)

Returns

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

Sample

ExampleResultDescription
subWeeks(2023-04-08, 2)2023-03-25Subtracts 2 weeks from the date 2023-04-08, resulting in the date 2023-03-25.

To view all the Date functions, click here.

See Also