I am attempting to convert string which is formatted like MM/DD/YYYY to an actual date format in Arcade on ArcGIS Online. This is the code I am using.
var cd = split($feature["DATE_"], " ")
var dates = split(cd[1], "/")
var m = dates[0]
var d = dates[1]
var y = dates[2]
return Text(Date(m, d, y), 'MMMM D, Y')
The output in the example instance that I am using should be August 26, 2019 but it spits out July 9, 1915. The issue is in the last line somewhere, as returning y gives 2019, d gives 26, and m gives 8.
Does anybody know why it may be outputting the incorrect date?