4D v14.3

Month of

Home

 
4D v14.3
Month of

Month of 


 

Month of ( aDate ) -> Function result 
Parameter Type   Description
aDate  Date in Date for which to return the month
Function result  Longint in Number indicating the month of date

The Month of command returns the month of aDate.

Note: Month of returns the number of the month, not the name (see Example 1).

To compare the value returned by this function, 4D provides the following predefined constants, found in the "Days and Months" theme:

Constant Type Value
January Longint 1
February Longint 2
March Longint 3
April Longint 4
May Longint 5
June Longint 6
July Longint 7
August Longint 8
September Longint 9
October Longint 10
November Longint 11
December Longint 12

The following example illustrates the use of Month of. The results are assigned to the variable vResult. The comments describe what is put in vResult:

 vResult:=Month of(!12/25/92!) ` vResult gets 12
 vResult:=Month of(Current date` vResult gets month of current date

See example for the command Current date.

 
PROPERTIES 

Product: 4D
Theme: Date and Time
Number: 24

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Day of
Year of

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)