Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.
Microsoft® JScript®
setUTCMilliseconds Method
 Language Reference 
Version 3 

See Also                  Applies To


Description
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
Syntax
objDate.setUTCMilliseconds(numMilli)

The numMilli argument is a numeric value equal to the milliseconds value.

Remarks
To set the milliseconds using local time, use the setMilliseconds method.

If the value of numMilli is greater than 999 or is a negative number, the stored number of seconds (and minutes, hours, and so forth, if necessary) is incremented an appropriate amount.

The following example illustrates the use of the setUTCMilliseconds method:

function SetUTCMSecDemo(nmsec)
{  
  var d, s;
  var sep = ":";
  d = new Date();
  d.setUTCMilliseconds(nmsec);
  s = "Current setting is ";
  s += d.toUTCString() + sep + d.getUTCMilliseconds();
  return(s);
}

Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.