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.
Here is my current template:
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.
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.
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.
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
Survey interface
Feature Layer
Report Template
Report