Different formats for time field in Survey123

1539
5
11-13-2018 07:02 AM
Status: Open
Katie_Clark
MVP Regular Contributor

Survey creators should be able to configure 'time' and 'dateTime' questions so end users can enter this information following a specified time format.

For example, I would like to configure a date time question so the time is entered always following military (24-hour time) format.  Currently, the datetime and time questions get the time format from the locale of the device. This is not ideal. I want to control the time format for data entry. 

As an idea of what the XLSForm syntax could look like: New syntax for the body::esri:style or appearance columns.

5 Comments
IsmaelChivite

Hi @Katie_Clark  Thanks for your idea. I see a couple of different asks in your idea. Please let me know if I understand your request correctly:

  1. You want to be able to control the date/time format used by the end user in the form. That is, when the date/time is captured by the end user. 
  2. You want to define the format of a Date/time value when create a custom PDF report.  

For #1 above, what do you think about using the body::esri:style column to define the format that the Date/Time widget should use? Would that make the trick for you? It is not currently implemented, but this could potentially be a solution for consideration.

For #2: Regardless of the format used to capture the date/time, you can control the format used to outptut a Date/Time value in a PDF report.  For example:

IsmaelChivite_0-1681405794454.png

If you want to add AM/PM, use A (or a if you want it as am/pm).

IsmaelChivite
Status changed to: Needs Clarification
 
Katie_Clark

Hi @IsmaelChivite ! Thank you for your response!

 

For #1, yes I think that would work well as a solution. Either that, or using the "appearance" column, whichever makes more sense.

For #2....I posted this idea quite a while ago and I have learned so much since then, including being able to better format data outputs in a custom report template. But thank you so much for clarifying about the "A". It might be helpful to include that particular syntax in the quick reference guide (as you show in your screenshot) as well? 

Thanks!

 

IsmaelChivite
Status changed to: Open
 
IsmaelChivite

@Katie_Clark  Thanks for the quick response. I adjusted the original text to make it more direct. Lets wait and see if this idea gets traction. Thanks again.