I am using ArcPro 2.8.2. I am using the unique value symbol option to symbolize by three fields one being a date field. How can I exclude the time portion of the date to lessen the unique values. I only want to use the month, day and year to determine uniqueness. I've tried most of the date formats but they all seem to maintain the hour for the root attribution.
Solved! Go to Solution.
You can use an expression, rather than the value itself. Behind the scenes, a date field is just storing a timestamp integer; changing the format won't change the underlying value.
Here are a couple different options:
var d = $feature['date-field']
// To keep the output as a Date type. Cuts the time portion off.
return Date(Year(d), Month(d), Day(d))
// To convert to string. Lets you fine-tune how the output is formatted.
return Text(d, 'Y-M-D')
You can use an expression, rather than the value itself. Behind the scenes, a date field is just storing a timestamp integer; changing the format won't change the underlying value.
Here are a couple different options:
var d = $feature['date-field']
// To keep the output as a Date type. Cuts the time portion off.
return Date(Year(d), Month(d), Day(d))
// To convert to string. Lets you fine-tune how the output is formatted.
return Text(d, 'Y-M-D')