User Guide Cancel

SetDay

 

Description

Sets the day on the Date object. This is a member function called by the Date object.

Returns

DateObject

History

New in Adobe ColdFusion (2016 release)

Category

Date and time functions

Syntax

setDay (day)
setDay (day)
setDay (day)

Parameter

Parameter

Description

Day

Required. An integer representing the day.

Example

<cfscript>
myDate=now();
WriteOutput(myDate.setDay(15));
</cfscript>
<cfscript> myDate=now(); WriteOutput(myDate.setDay(15)); </cfscript>
<cfscript>
       myDate=now();
       WriteOutput(myDate.setDay(15));
</cfscript>

Output

{ts '2018-11-15 07:12:45'}

Get help faster and easier

New user?