ODK collect_duration

Hello!

I want to capture the duration of an activity on a single day in hours and
minutes. If I use the Time variable it comes with AM/PM option which I
don't need. Is there any suggestion on how I can just capture the duration?

Many thanks,
Rubana

Hi Rubana,

There is no generic widget that does this.

One option is to use two integer widgets on the same screen, one with
the label of minutes, the other with a label of seconds. Make sure
both have a constraint of 0-60.

Another option is to use two time widgets, one for start time, another
for end time. Constrain them so the end comes after the start and take
the difference either in the form or server side.

I'd recommend the first option because the second option can have
unexpected behavior with time changes on the device.

Yaw

··· On Tue, Apr 18, 2017 at 7:43 AM, Rubana Islam wrote: > Hello! > > I want to capture the duration of an activity on a single day in hours and > minutes. If I use the Time variable it comes with AM/PM option which I > don't need. Is there any suggestion on how I can just capture the duration? > > Many thanks, > Rubana > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.

Thanks Yaw. This is very helpful I will go with the first option I think.

Best,
Rubana

··· On Wednesday, April 19, 2017 at 9:27:41 AM UTC+10, Yaw Anokwa wrote: > > Hi Rubana, > > There is no generic widget that does this. > > One option is to use two integer widgets on the same screen, one with > the label of minutes, the other with a label of seconds. Make sure > both have a constraint of 0-60. > > Another option is to use two time widgets, one for start time, another > for end time. Constrain them so the end comes after the start and take > the difference either in the form or server side. > > I'd recommend the first option because the second option can have > unexpected behavior with time changes on the device. > > Yaw > > On Tue, Apr 18, 2017 at 7:43 AM, Rubana Islam <iru...@gmail.com > wrote: > > Hello! > > > > I want to capture the duration of an activity on a single day in hours > and > > minutes. If I use the Time variable it comes with AM/PM option which I > > don't need. Is there any suggestion on how I can just capture the > duration? > > > > Many thanks, > > Rubana > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google > Groups > > "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. >