month Method

Class: Date

Description

This method returns the formatted month (two digits) of the Date object. Because the value may include a leading zero, the type of the return is String. If you need the month as a Number, use the monthOfYear method.

Syntax

dateObject.month()

Parameters

None

Returns

A String consisting of the two-digit month value from the Date object.

When Became Available

Profile v6.4

Example

type RecordCIF cif = Db.getRecord("CIF","ACN=:ACN")

type Date date = cif.dob               // declare Date object

type String DAY   = date.day()

type String MONTH = date.month()

 

* Variable ACN must be defined prior to the getRecord statement.