User Guide Cancel

SetMonth

 

Description

Sets the month 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

setMonth (month)
setMonth (month)
setMonth (month)

Parameter

Parameter

Description

month

Required. An integer representing the month.

Example

<cfscript>
myDate=now();
WriteOutput(myDate.setMonth(10));
</cfscript>
<cfscript> myDate=now(); WriteOutput(myDate.setMonth(10)); </cfscript>
<cfscript>
       myDate=now();
       WriteOutput(myDate.setMonth(10));
</cfscript>

Get help faster and easier

New user?