I would like to display a time field from my survey in a report the same way it appears in my feature layer. In this case that is 3:45 PM. The report display comes through in 24hr format though.
AdamGebhart_0-1760554950265.png
AdamGebhart_1-1760554980422.png
Here is my current template:
AdamGebhart_2-1760555080922.png
Is there a reason it changes to 24hr format? I tried the following format in the template but it gets rejected and I'm not able to test it.
AdamGebhart_3-1760555198278.png
In the xlsx I've also set bind::type to time and bind::esri:fieldType to esriFieldTypeTimeOnly.
Is there a limitation here or am I not getting the correct format or syntax?
Solved! Go to Solution.
The time field is stored as a string and not a dateTime. Converting 24hrs to 12hrs is a little trickier than a datetime type. I think there are some examples I am trying to find....
Whats the error msg it is throwing when rejected. According to this it should be right: https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereport-datetime.htm
with the exception in the pic you are showing 2 curly brackets '}}' from what your are showing there should only be 1?
Edit: is your question for ${bite_time} a time-only type?
Thanks @Neal_t_k . Here is the error when I try load the template.
AdamGebhart_0-1760557485954.png
Do I need to change anything here (below)? I originally did not update bind::type and bind::esri:fieldType. They were default (blank). I updated them to what you see to test whether or not they would enable the format to work in the report template. It hasn't in either configuration.
AdamGebhart_1-1760557566043.png
The time field is stored as a string and not a dateTime. Converting 24hrs to 12hrs is a little trickier than a datetime type. I think there are some examples I am trying to find....
Here is the one I was thinking of, hope it helps: https://community.esri.com/t5/arcgis-survey123-questions/time-question-in-12-hour-format-in-feature-...
Thanks @Neal_t_k . With approval of the staff for whom I'm creating the survey I ended up changing this to a dateTime format. We were already collecting the date in an adjacent question so it was easy to merge them, then break them out into two separate items in the report template.
For anyone else looking at this, here is what I ended up with.
bind::type and bind::esri:fieldType are default (blank)
XLSX
AdamGebhart_0-1760561730891.png
Survey interface
AdamGebhart_1-1760561800958.png
Feature Layer
AdamGebhart_2-1760561837761.png
Report Template
AdamGebhart_3-1760561910538.png
Report
AdamGebhart_4-1760561935409.jpeg