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

getUTCHours() Method


This method returns the UTC hour of a Date object.

Syntax

dateVar.getUTCHours()

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, 2005 13:24:35");
TheApplication().RaiseErrorText("Local hour is " + aDate.getHours() +
   "\nGMT hour is " + aDate.getUTCHours());

See Also

getHours() Method
setUTCHours() Method

Siebel eScript Language Reference Copyright © 2007, Oracle. All rights reserved.