Is there a way to have time NOT display in military time?

624
3
11-04-2019 09:27 AM
KellySquires1
New Contributor II

I have multiple time fields (only time, not datetime) in a survey that is fueling a public-facing map. It is important to have our time fields display as AM/PM readings instead of military time, since that this what the general public is much more familiar with, but we can't figure out how to do it. I've read a lot of Survey123 documentation (including the article called Dates and Time in Survey123 for ArcGIS that I've seen frequently referenced in questions like this) but I haven't found anything that really answers this question.

0 Kudos
3 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Kelly,

Both the web app and field app display 12-hour time:

 

Where are you seeing 24-hour time?

0 Kudos
KellySquires1
New Contributor II

While 12-hour time is available for entering the data in the survey, in the resulting feature layer in ArcOnline all of the data points in the time fields are displayed in military time. It's very confusing as to why the format changes from what is entered to how it is displayed. We're using this feature layer for a public-facing map, so displaying in military time is not very useful. Below, in the first image on the left, is how the time fields look when they are being entered in Survey123 in a web browser; 12-hour time, seems like it should be great. However, in the second image, in the red box, is how those exact same entries show up in the feature layer in ArcOnline (and thus in any pop-ups used in web maps). Note: all of the data points above the red box are only in 12-hour time because I manually changed all 150+ of our entries in the data table.

How the time field looks when itHow the time field looks in the feature layer.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Kelly,

Time is stored in a text field as a fixed string (not a time object that can be localized); when it's written, it's stored in a 24 hour format, which is what you are seeing. You could construct an Arcade function to parse the time an produce an AM/PM version.

0 Kudos