HOW TO

Display date fields in labels without timestamps using Arcade in ArcGIS Online and ArcGIS Enterprise portal

First Published: May 9, 2023
Last Published: April 23, 2026

Summary

In ArcGIS Online and the ArcGIS Enterprise portal, the timestamps can be removed using an Arcade expression when displaying a date field as labels. This is useful when displaying a date field without timestamps while retaining the timestamps in the attribute table. In this example, the date field used is named ‘TestDate'.

The web map below displays the date field labels with timestamps to be removed using the following workflow.

Web map displaying date field labels with timestamps

Procedure

  1. Open the web map in Map Viewer.
  2. On the Settings (light) toolbar, click MoreLabels Label icon. Ensure labels are enabled by toggling on the Enable labels option.
  3. In the Label features pane, click Add label class. Under Label field, click Use expression Use expression icon.
  4. In the editor window, configure the expression below. Replace <field_name> with the name of the date field to be displayed as labels.
Note: 
The format of the dates can be configured as per preference. In this example, the date format used is Y-MM-DD.
Text($feature.<field_name>, 'Y-MM-DD')
  1. Click Done in ArcGIS Online Map Viewer or OK in the ArcGIS Enterprise portal.
Expression specified in the code box

The web map below displays the date field labels without the timestamps.

Date field labels without timestamps

Article ID: 000030241

Software:
  • ArcGIS Online
  • Portal for ArcGIS

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options