So I've noticed that text fields in arcgis online are reformatting dates. How do I stop this? I made it a text field for a reason. I want "October 2023" to appear, not "10/1/2023". The only way I can get it to stop doing this is to put in extra text, but I don't want that.
Please see the photos:
What I've written:
What appears in the pop-up:
Help!
Solved! Go to Solution.
I think I found the issue
- If you can open the web map in https://ago-assistant.esri.com/
- Check the field under fieldinfos and see if the property format exists.
- If a format exists and it says shortdate
- if its there you can delete it from the JSON in the assistant
What caused this? I think possibly the original map created had the layer being used the field was originally a date field. The layer was overwritten and the field was changed to a string field but the web map still contained the date formatting.
Can you share your map and I can take a look? thanks!
Unfortunately, no. It has some internal information, so I can't.
Are you setting the formatting on the fields
It's a text field, not a date field, so I don't even have that option. That's what is so confusing to me!
Text field:
Formatting options:
I can add additional text and it'll stop trying to convert it to a date, but it isn't ideal:
Can you see what the service returns for that feature through the REST endpoint? I checked against a text field and the string October 2021 was not adjusted with formatting. If you can create a repro case using some other data or map that would be great too.
I tried to create a new point feature class and it's not doing it, so I'm really not sure why this one just started acting up. I assumed it had to do with the most recent AGO update, but if it's only this feature layer that's affected, I'm at a loss.
Can you tell me where to look for the REST endpoint? Should I be looking for something specific? Looking at the rest services page, the only line about it says:
I think I found the issue
- If you can open the web map in https://ago-assistant.esri.com/
- Check the field under fieldinfos and see if the property format exists.
- If a format exists and it says shortdate
- if its there you can delete it from the JSON in the assistant
What caused this? I think possibly the original map created had the layer being used the field was originally a date field. The layer was overwritten and the field was changed to a string field but the web map still contained the date formatting.
Thank you! This worked beautifully 😄
I think yes, when I first created this, it was an actual date field, but I realized that wouldn't work in all cases.
Ok- update: I put the layer in a new map- no issue. It's something to do with the map it's already in. Any ideas what could be causing it? It's not in an attribute expression, it's just selected from the fields list.