I'm trying convert the dateTime value of a previous question to Time of Day(24-hour) to the next question. For example, if a user enters 3/11/2021 4:15 PM, I want to calculate it to be 16:15 and be read only for answer of the next question. I know that the readonly and calculation columns exist in the XLS form. I just want to know what kind of expression is needed to perform the date time convertion.
Thanks!
Solved! Go to Solution.
Hi @RachelBu
If you just want to store the 24-hour time as a string, use the format-date() function. For example:
format-date(${datetime},'%H:%M')
For more examples and useful info, please see this great blog post all about dates and time in Survey123.
Hope this helps! Best, Jim
Hi @RachelBu
If you just want to store the 24-hour time as a string, use the format-date() function. For example:
format-date(${datetime},'%H:%M')
For more examples and useful info, please see this great blog post all about dates and time in Survey123.
Hope this helps! Best, Jim
Thanks!