Hi, I am trying to create a list item that just shows the unique dates from a "StartDateTime" field in my layer. I have been able to do this if I reformat the date field to a string field but then the dates in the list are sorted numerically rather than in date order (e.g. all the 1st of each month at the top of the list etc).
My date field however is a date/time field and I'm struggling to work out how to remove the time part so I can just group by/show the unique dates.
I've so far tried this by creating a data expression, with the basic expression below. If anyone could provide help on how to edit this so it only brings back the unique dates (excluding the times) I would be very grateful. Or if there is some other way to do this e.g. through Advance formatting?
var fs = FeatureSetByPortalItem(Portal('https://xyzx.arcgis.com/'), 'xyzxyzx', 0, ['StartDateTime'], false);
return Distinct(fs,['StartDateTime']);