version 3
Month of (aDate) Number
Parameter | Type | Description | |
aDate | Date | Date for which to return the month | |
Function result | Number | Number indicating the month of date |
Description
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 | Long Integer | 1 |
February | Long Integer | 2 |
March | Long Integer | 3 |
April | Long Integer | 4 |
May | Long Integer | 5 |
June | Long Integer | 6 |
July | Long Integer | 7 |
August | Long Integer | 8 |
September | Long Integer | 9 |
October | Long Integer | 10 |
November | Long Integer | 11 |
December | Long Integer | 12 |
Examples
1. 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
2. See example for the command Current date.
See Also