Siebel eScript Language Reference > Siebel eScript Commands > Date and Time Methods >

getHours() Method


This method returns the hour of a Date object.

Syntax

dateVar.getHours()

Returns

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

Usage

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

Example

This code fragment returns the number 12, the hours portion of the specified time.

var aDate = new Date("October 31, 1986 12:13:14");
TheApplication().RaiseErrorText(aDate.getHours());

See Also

getDate() Method
getDay() Method
getFullYear() Method
getMinutes() Method
getMonth() Method
getSeconds() Method
getTime() Method
getYear() Method

Siebel eScript Language Reference