I was wondering if there is any equivalent for the DatePart helper from desktop? I am trying to get the date from 1-365 and have seen that DatePart ('y' [DateTime Field]) works, but have not been able to find the equivalent for pro in the calculate field.
Solved! Go to Solution.
Text will do it. https://developers.arcgis.com/arcade/function-reference/data_functions/#text
Text([DateTimeField], 'Y')
Edit: 'DDD' in the format param will get the day number from 1 to 365.
Text will do it. https://developers.arcgis.com/arcade/function-reference/data_functions/#text
Text([DateTimeField], 'Y')
Edit: 'DDD' in the format param will get the day number from 1 to 365.
That did the trick for the most part! I had to omit the square brackets to get the desired values, and had to make a new field so the values were numeric for my purposes, but otherwise was exactly what I was looking for. Thanks