setMonth()

Sets the value of the Month calendar field.

Syntax

Calendar setMonth(Numeric value)
  1. value is the month to set.

Usage

For example, set the value of the Month calendar field by calling:
Calendar.fromDate(Date.parseString("05/12/1999","mm/dd/yyyy")).setMonth(10).toDate().format("mm/dd/yyyy")
This example populates a Word Box. To achieve the same goal and populate a Date box, call:
Calendar.fromDate(Date.parseString("05/12/1999","mm/dd/yyyy")).setMonth(10).toDate()