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

getMonth() Method


This method returns the month of a Date object.

Syntax

dateVar.getMonth()

Parameter
Description
Not applicable
 

Returns

The month portion of dateVar as a number from 0 to 11.

Usage

This method returns the month, as a number from 0 to 11, of dateVar. January is 0, and December is 11.

Example

This code fragment returns the number 10, the result of adding 1 to the month portion of the specified date.

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

See Also

GetDate() Method, getDay() Method, getFullYear() Method, getHours() Method, getMinutes() Method, getSeconds() Method, getTime() Method, and getYear() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003