Format date in a ArcGIS dashboard indicator to a more concise format

806
5
07-19-2022 08:14 AM
GeorgeJones9282
New Contributor II

Anyway to format the above date in the ArcGIS dashboard indicator to a more concise format(mm/dd/yyyy) ?

For instance is there a JavaScript function for it?

Kind regards. 

0 Kudos
5 Replies
KenBuja
MVP Esteemed Contributor

The easiest is using the Text function.

 

Text(Now(), 'MM/DD/YYYY')

 

jcarlson
MVP Esteemed Contributor

Where's your "Date Updated" text coming from? Is this an attribute? Is it displaying in a popup?

If this happens to be a attribute, you can go into your layer's visualization settings, or else go into the map your dashboard is built off of (if applicable), and edit your attribute settings there. These settings should carry forward into your Dashboard.

jcarlson_0-1658246133746.png

 

- Josh Carlson
Kendall County GIS
ZachBodenner
MVP Regular Contributor

What can you do if your dashboard isn't using a map, but instead just working off a published map service? 

0 Kudos
jcarlson
MVP Esteemed Contributor

It will use the default formatting defined in the service. You can use a Data Expression if you need more control over it.

- Josh Carlson
Kendall County GIS
0 Kudos
ZachBodenner
MVP Regular Contributor

Thanks John, can you provide a link to documentation on that? As an example of what I working with, I have this field in a table in Pro, date field, just showing dd/mm/yyyy:

ZachBodenner_0-1686078071483.png

But then when I publish it to the web service used in a dashboard, the dashboard automatically adds the time stamp, with no way to configure the appearance within the dashboard:

ZachBodenner_1-1686078124768.png

 

0 Kudos