setDate

Modified on Tue, 22 Aug 2023

Description

Use this function to set the day of the month to the given date.

Syntax

setDate(date, dayOfMonth)

Returns

Return ValueDescription
DateReturn the resulting date.

Sample

ExampleResultDescription
setDate(2023-3-1, 15)2023-3-15Returns the output as 2023-3-15.

To view all the Date functions, click here.

See Also