Is there any "time" type data format?

Is it possible to collect time data (e.g: Hours:Minute:Second) like “date” type data?

There are time and a date-time question types. I don’t see that seconds are supported.

47%20AM

1 Like

In Enketo web forms seconds are disabled by default. I think this is because most users would find the extra field confusing and unhelpful. @Suman Could you help us understand the use case(s) where you need to record hours, minutes and seconds? As a current workaround the only option would be to add an additional integer question and limit it to values of 0-59.

2 Likes

You can collect time data using the meta data. It will show your start/end time in Date-Hours-Minute-Second in your data
image

1 Like

Thanks @sammyhawkrad.

1 Like

I am working on a Water Boiling Test survey in a carbon credit program certified by Gold Standard. The survey asks for a 24-hour time date stamp hh:mm:ss. It would be helpful if it were possible to enable seconds for this use case. Thank you for letting me know if there is any way to enable a seconds timestamp feature in the enketo webforms.

Jeff

1 Like

Hi Jeff,

It’s not possible with the regular time question type, which is limited to hours and minutes.

I suggest instead creating a text question and using a custom constraint using a regular expression. In this case you would enter the following into the custom constraint field:

regex( . , '^(\d*:?\d+:\d\d)$' )

…which would allow

1:00:00
12:01:02
0:00:01
1:00

1 Like

Hi Tinok,

I appreciate your response to my question. Thank you, though for whatever reason, I couldn’t get it to work.

For now I settled on using 3 separate integer questions.

Warmly,

Jeff

Hello,
Try with regex( . , ‘…’ )

Might be a KoBo improvement idea: Provide additional apperance options for date-time type, like hour, minute, second and combinations, with hour-minute keeping as default.

Sorry, @Jeff, here is the correct constraint code (thanks @wroos for pointing this out):

regex( . , '^(\d*:?\d+:\d\d)$' )
(also corrected above)

2 Likes

It is a good thread to ask this; is it possible to allow the hour/minute selection pop-up move forward/backward in 1 minute interval? (When the respondent clock UP/DOWN arrows, the displayed number of MUNUTES will increase/decrease in 15 minutes interval. I would like to change it to 1 minute interval to collect more accurate answers.)

image

I understand that the respondent can put the exact numbers in the pop-up by clicking the numbers in the pop-up but it seems a bit difficult to recognize for them.

If it is not possible, I will simply replace TIME type question by INTEGERs.

Thank you for your attention!

Hello,
I would just stress training and a question hint. Integer will create several advantages (two parts, constraints, time calculation).