Hi,
I am trying to use some answers from my form plus the date and time to dynamically create a unique form ID for easier post processing - I want something more human readable than the builtin form ID. I am having difficulty in getting the timestamp to be integrated into the generated ID.
I made a calculated field called datetime_start
to get the time and date in the required format:
concat(substr(${start},2,4),substr(${start},5,7),substr(${start},8,10),'-',substr(${start},11,13),substr(${start},14,16))
and made a note for testing :
start is ${datetime_start}
on the form preview inside kobo toolbox, that gives me the output i expect:
start is 230131-1934
however, when i deploy the form and test it in the app on my phone, I only see the date but not the time, like this:
start is 230131-
If I save the form and view the saved data, I can see 230131-
as the value of the calculation, but in the built in “start” column I can see both date and time are being captured.
I also tested this using the now()
and today()
functions, and a time question with the default answer as now(), and I always get the same problem - it works on the browser but doesn’t work on the phone.
Can anyone see what I am doing wrong?
Thanks!