The following expression converts UTC date to to Local Date. Replace Timestamp() with your date variable.
ToLocal(Timestamp())
https://developers.arcgis.com/arcade/function-reference/date_functions/#tolocal
I think I am getting closer to what I wanted.
I had to get just the date part of today.
2023-01-14T00:00:00-07:00 with the Text Function
var dispatch = $feature.dispatch_date
var Today = Date(Text(now, "Y-MM-DD"))
If (dispatch > Today)
{
'today'
}
else
{
'past'
}
Mele
Assuming the dispatch_date field also has Date datatype, you can check the following expression
var dispatch = $feature.dispatch_date
var dispatchdate = Concatenate(Year(dispatch),'-',Month(dispatch)+1,'-',Day(dispatch))
var currentdate = Concatenate(Year(Today()),'-',Month(Today())+1,'-',Day(Today()))
If (dispatchdate == currentdate)
{
'today'
}
else
{
'past'
}