When working with a geodatabase feature class containing a date field, ArcMap does not display the timestamp if the date field is used in a display expression and the timestamp is not populated.
Pro seems to respect this convention in the attribute table, in that the timestamp is not shown if it is not populated in the date field. It also does not display the timestamp in the Display if the timestamp is not populated and the date field *is* the display field by itself. But, if that same date field is used in a Display field expression within layer properties, the timestamp is displayed even if it's not populated.
I'm not sure if there's something I'm fundamentally not understanding about Arcade expression and/or timestamps but this also seems like it could be an oversight. Here's what my display expression looks like in ArcMap:
Sample result: Central Appalachian Basic Ash - Hickory Woodland-ALBE013-05/09/2011. This is the desired outcome since the timestamps are not populated in the date field.
And in Pro, on the same dataset:
Sample result:
This is not the desired result and different from the behavior in ArcMap.
Can this be implemented in a future release of Pro (or if I'm totally missing something, could you please steer me in the right direction)? I searched other posts before creating this idea but couldn't find anything similar.
Thanks!
Hi @DanielleKulas Note that ArcMap is using the Python parser while Pro is using Arcade. While different, what this allows is for these expressions to work across ArcGIS (in web maps, etc.)
Try $feature.COMM_TYPE + '-' + $feature.PLOT + '-' +Text($feature.Date, 'MM-DD-Y')
The formats for text functions are specified here: https://developers.arcgis.com/arcade/function-reference/text_functions/
Hope this helps!
@KoryKramer Thank you so much, that's perfect! I was hoping it was something simple 🙂 Much appreciated.
Glad that works for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.