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

Date.UTC() Static Method

This method interprets its parameters as a date and returns the number of milliseconds between midnight, January 1, 1970, and the date and time specified.


Date.UTC(year, month, day, [, hours[, minutes[, seconds]]])



An integer representing the year (two digits may be used to represent years in the twentieth century; however, use four digits to avoid Y2K problems)


An integer from 0 through 11 representing the month


An integer from 1 through 31 representing the day of the month


An integer from 0 through 23 representing the hour on a 24-hour clock


An integer from 0 through 59 representing the minute of hours


An integer from 0 through 59 representing the second of minutes


An integer representing the number of milliseconds before or after midnight January 1, 1970, of the specified date and time.


Date.UTC is a static method, invoked using the Date constructor rather than a variable. The parameters are interpreted as referring to Greenwich mean time (GMT).


This example shows the proper construction of a Date.UTC declaration and demonstrates that the function behaves as specified.

function clickme_Click ()
   var aDate = new Date(Date.UTC(2005, 1, 22, 10, 11, 12));
   TheApplication().RaiseErrorText("The specified date is " +

A sample run of this code produced the following result.

The specified date is Sat Jan 22 10:11:12 2005 GMT

See Also

The Date Constructor in Siebel eScript

Siebel eScript Language Reference