Skip to main content
Version: 1.0.0

monthOf

monthOf* ( aDate : date ) : integer

ParameterTypeDescription
aDatedateDate for which to return the month
ResultintegerNumber indicating the month of aDate

Description

The monthOf command returns the month number of aDate.

monthOf returns the number of the month, not the name (see example).

To compare the value returned by this function, Qodly provides the following predefined constants:

ConstantTypeValue
Januaryinteger1
Februaryinteger2
Marchinteger3
Aprilinteger4
Mayinteger5
Juneinteger6
Julyinteger7
Augustinteger8
Septemberinteger9
Octoberinteger10
Novemberinteger11
Decemberinteger12

Example

 var vResult : integer
vResult = monthOf(!12/25/92!) // vResult gets 12
vResult = monthOf(currentDate) // vResult gets month of current date

See also

dayOf
yearOf