Arcade expression to format date

1547
3
06-25-2023 06:33 PM
FrankHerbert
New Contributor III

I have created an Arcade expression to group attributes and return them in a list. I'm very new to Arcade and having trouble understanding how to format the date. I have attached an image of the expression showing my progress.

Currently the date is returned as "Jun 23, 2023, 10:31:00 AM GMT+12" but I would like to see it as 23/06/23.

Please can someone tell what I need to fix to change this?

Thanks in advance.

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

this may be useful

Date functions | ArcGIS Arcade | ArcGIS Developers


... sort of retired...
0 Kudos
SSchott_CLAU
New Contributor III

@FrankHerbert , you can use the date functions as mentioned above.

Below is the code which I use in my maps to format the dates.

Day($feature.date) + "/" + ISOMonth($feature.date) + "/" + ISOYear($feature.date)

SSchott_CLAU_0-1687754512199.png

 

KenBuja
MVP Esteemed Contributor

The Text function is very handy to make various date strings

Text(Now(), 'YY/MM/DD');

 

0 Kudos