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

getUTCHours() Method


This method returns the UTC hour of a Date object.

Syntax

dateVar.getUTCHours()

Parameter
Description
Not applicable
 

Returns

The UTC hour of dateVar as a number from 0 to 23.

Usage

This method returns the UTC hour of dateVar as a number from 0 through 23. Midnight is 0, and 11 PM is 23.

Example

This code fragment displays 13, the hour portion of the date, followed by the GMT equivalent.

var aDate = new Date("May 1, 2001 13:24:35");
TheApplication().RaiseErrorText("Local hour is " + aDate.getHours() +
   "\nGMT hour is " + aDate.getUTCHours());

See Also

getHours() Method and setUTCHours() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003