Description

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

setMinute (minute)

Parameter

Parameter Description
minute

Required. An integer representing the minutes.

Expected values are 0-59, but other values are allowed:

  • -1 results in the last second of the previous minute
  • 60 results in the first second of the next minute

Example

<cfscript>
       myDate=now();
       WriteOutput(myDate.setMinute(30));
</cfscript>

Output

{ts '2018-11-06 07:30:01'}

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy