Month of

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 3


Month of (aDate) Number

ParameterTypeDescription
aDateDateDate for which to return the month
Function resultNumberNumber 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:

ConstantTypeValue
JanuaryLong Integer 1
FebruaryLong Integer 2
MarchLong Integer 3
AprilLong Integer 4
MayLong Integer 5
JuneLong Integer 6
JulyLong Integer 7
AugustLong Integer 8
SeptemberLong Integer 9
OctoberLong Integer10
NovemberLong Integer11
DecemberLong Integer12

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

Day of, Year of.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next