Get current month index


I would like to get the current month index, for example if we’re in January, get 0. February get 1…


index = (Date.Today.Month - 1)

Hi jadbenn,
Now.Month will return the 1-based index (January = 1, February = 2 …). Simply subtract 1 to it to find what you need


Try with below. And it worked for me.


If you need the index simply -1 from the current value. Then Jan 1 becomes 0 and Feb 2 comes 1 March 3 comes 2 and so on,