LastDayOfMonth(iYear, iMonth)
Syntax
%LastDayOfMonth(UInteger, UInteger)%
Description
Returns the last day of the month specified by UInteger in the year specified by UInteger (for example, Sunday, Monday, etc.).
Parameters
Parameter | Description |
---|---|
UInteger | A 16 bit unsigned integer value (num). The number of bits is controlled by the #Language setting. |
The return integer is one of the following:
NumZ{day} | Value | Description |
---|---|---|
vbSunday | 1 | Sunday |
vbMonday | 2 | Monday |
vbTuesday | 3 | Tuesday |
vbWednesday | 4 | Wednesday |
vbThursday | 5 | Thursday |
vbFriday | 6 | Friday |
vbSaturday | 7 | Saturday |
Examples
AML example
NOTE:
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Copy
<AMVARIABLE NAME="varDay" VALUE="" />
<AMVARIABLE ACTIVITY="set" VARIABLENAME="varDay">%LastDayOfMonth(2024, 2)%</AMVARIABLE>
<AMSHOWDIALOG>%varDay%</AMSHOWDIALOG>
VB script example
Sub
MsgBox LastDayOfMonth(2024, 2)
End Sub