A collegue used collector to record some records but a datefield wasn't filled. I decided to use arcade to fill the field:
But instead of May 11th I see June 10th. This is so confusing.
I understand that date is stored in utc but displayed in my local timezone (I'm near Amsterdam) so I was expecting some hours difference but this seems more than a month.
What am I doing wrong?
regards,
Bert
Solved! Go to Solution.
Can anyone explain why the month() would be indexed at 0, while day() and year() actually returns what one would expect? Python treats months consistently, and I just can't wrap my head around why arcade would have been designed this way.
yeah it makes no sense..
Although it is stated in the documentation for both the Date function and the Month function, it makes no sense at all that this is 0-based.
The problem with changing that is that any existing arcade expressions that use these functions will fail. I would still recommend Esri to change these features instead of continuing to bear the pain all the following years.
This seems pretty insane to me: months are randomly zero indexed? Who would have checked off on this? This is clearly a bug.