Action Block to get Last Day of Month

Dm114

Well-known member
fⁿLastDOM Action Block to get Last Day of Month (from 28 to 31) depending on selected month.

INPUT string variable (optional):
YYYYMM = concatenated Year (4-digit) & Month (2-digit). Default: current month. Example: 202302

OUTPUT string variable:
LastDOM = 28, 29, 30 or 31 string, depending on YYYYMM value. Empty in case of wrong or out of range input

⚠️ Year YYYY must be in the range of 1900 to 2099 and Month MM from 01 to 12


Enjoy!
 

Dm114

Well-known member
To trigger a macro on the last day/time every month, you must have 4 triggers (one on 28th, another on 29th, 30th and 31st) and programmatically test whether Magic text {dayofmonth} equals calculated LastDOM (Action Block call without input parameter as default current month).

The sample macro in the Template store has been edited to illustrate this example.
 
Last edited:
Top