Siebel eScript Language Reference > Siebel eScript Commands > Universal Time Methods >

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.





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


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.


The following example gets a number of milliseconds as input and converts it to a UTC date and time.

function dateBtn_Click ()
   var aDate = new Date;
   var milli = 20000;
   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.");

When run at 5:36 P.M., Pacific time, on November 22, 1999, it produced the following result.

The specified date is 11/23/1999 at 1:36 UTC time.

See Also

getUTCMilliseconds() Method
setMilliseconds() Method
Universal Time Methods

Siebel eScript Language Reference