- Desktop
- Scripting
- Formulas and Scripting Functions
- DAYNUM(), MONTHNUM(), and YEARNUM()
DAYNUM(), MONTHNUM(), and YEARNUM()
Overview
Section titled “Overview”These functions returns integers for their respective values:
DAYNUM() will show the day of the month, ranging from 1 to 31.
MONTHNUM() shows the month as a value between 1 and 12.
YEARNUM() will show the year eg 2020.
Example
Section titled “Example”Example showing 2020 2nd quarter performance using the MONTHNUM() and YEARNUM() functions:
//Get quarter end for JuneM1 = MONTHNUM() == 6 and YEARNUM() == 2020;
//Get quarter end for MarchM2 = MONTHNUM() == 3 and YEARNUM() == 2020;
//Get closing values for above datesV1 = VALUEWHEN(M1);V2 = VALUEWHEN(M2);
//Calculate % change((V1/V2)-1)
Your privacy choices
We use cookies and similar technologies to make the site work, see how it's used, and improve it. Analytics and advertising cookies only run with your consent — see our Privacy Policy for details.