Siebel eScript Language Reference > Siebel eScript Commands > The Date Object >

setUTCMilliseconds() Method


This method sets the UTC millisecond of a Date object to a date expressed in milliseconds relative to the UTC equivalent of the system time.

Syntax

dateVar.setUTCMilliseconds(millisecond)

Parameter
Description
millisecond
The UTC millisecond to which dateVar should be set as a positive or negative integer

Returns

Not applicable

Usage

This method sets the UTC millisecond of dateVar to millisecond. The value of dateVar becomes equivalent to the number of milliseconds from the UTC equivalent of time on the system clock. Use a positive number for later times, and a negative number for earlier times.

Example

The following example gets a number of milliseconds as input and converts it to a UTC date and time. When run at 5:36 p.m., Pacific Time, on November 22, 1999, it produced the result shown in the illustration.

function dateBtn_Click ()
{
   var aDate = new Date;
   var milli = 20000;
   aDate.setUTCMilliseconds(milli);
   var aYear = aDate.getUTCFullYear();
   var aMonth = aDate.getMonth() + 1;
   var aDay = aDate.getUTCDate();
   var anHour = aDate.getUTCHours();
   var aMinute = aDate.getUTCMinutes();
   TheApplication().RaiseErrorText("The specified date is " +
            aMonth +
      "/" + aDay + "/" + aYear + " at " + anHour + ":" +
      aMinute + ", UTC time.");
}

See Also

Universal Time Functions, getUTCMilliseconds() Method, and setMilliseconds() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003