setMinutes (JavaScript)

Sets the minute in local time. Optionally sets the second and millisecond.

Defined in

Date (Standard - JavaScript)

Syntax

setMinutes(min:int) : long

setMinutes(min:int, sec:int) : long

setMinutes(min:int, sec:int, ms:int) : long
Parameters Description
min The minute in local time where the minutes in an hour are 0 through 59.
sec The second in local time where the seconds in a minute are 0 through 59.
ms The millisecond in local time where the milliseconds in a second are 0 through 999.
Return value Description
long The new time in numeric format.

Examples

This computed label sets the current time with the minutes, second, and millisecond at 0.
var date = new Date();
date.setMinutes(0, 0, 0);
date.toLocaleTimeString()