Arcade: Month Function Returning Wrong Value

571
2
Jump to solution
05-18-2022 08:58 AM
Labels (1)
JustinReynolds
Occasional Contributor III

Maybe I'm going crazy here, but the Month Function in Arcade is returning the Month - 1.  Anybody else seeing this behavior?

console(Now())
console(Month(Now()))

2022-05-18T10:41:34.875-05:00
4

 

- Justin Reynolds, PE
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You have to remember that Month is zero-based:

Returns the month of the given date. Values range from 0-11 where January is 0 and December is 11.

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

You have to remember that Month is zero-based:

Returns the month of the given date. Values range from 0-11 where January is 0 and December is 11.

JustinReynolds
Occasional Contributor III

Guess I missed that in the documentation.  Makes sense.  Thanks

- Justin Reynolds, PE
0 Kudos