Select to view content in your preferred language

How to format date in category selector generated from Arcade Expression?

476
0
08-31-2023 01:04 PM
haileywright86
New Contributor

I’m using an arcade expression to generate the categories in a selector which allows the user to select a month from the past year. I need the list to reference the past year of data available in the feature set (max date minus 12 months), not the current date (hence why I opted for an expression on a category selector as opposed to a date selector).  

I was able to filter the date field in my feature set and return a distinct list of dates for the category selector but am stumped when it comes to formatting the category label to MMMM, yyyy (e.g. July, 2023) not as it's currently displayed as MMMM d, yyyy (July 1, 2023) since the day is irrelevant (it’s always 1).

How could I do this? Note that I'm using the line item template to call the filtered date field returned in my expression. 

0 Kudos
0 Replies