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

getMonth() Method

This method returns the month of a Date object.




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


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


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
getYear() Method

Siebel eScript Language Reference