Sets the day component of the given DateTime.

Syntax

Smartsite SXML CopyCode image Copy Code
datetime datetime.setday(datetime dt, integer day)

Parameters

Name Data Type Description
dt DateTime A DateTime.
day Integer The day (1 through the number of days in the month).

Return Value

Data Type Description
DateTime A new DateTime with the same component values as the given DateTime, except for the day component which is set to the given value.

Expand image Example

SXML