Minutes lapsed

Hi,

I am trying to create a hidden value that will show me the number of
minutes lapsed from one question to another question.
I am using these calculations.

A hidden value with: double(now())
Another hidden value with: double(now()) - double(#form/log_in_time)
-to represent the time that has passed
Another hidden value with: int(((#form/time_worked*24) -
int(#form/time_worked * 24)) * 60)

  • -to convert the time that has passed into minutes*

Everything seems to be in correctly and I am not sure what I am doing wrong
here, but when I preview it the value keeps coming up on my app as 0
minutes passed. Does anyone know why this is?

I referenced this page in
Dimagi: https://help.commcarehq.org/display/commcarepublic/Calculations+with+Dates+and+Times

Thank you!

Hello,

Unfortunately this is not possible. Please see the discussion here
https://groups.google.com/forum/#!searchin/commcare-users/time|sort:date/commcare-users/S2fIrvTSA9U/MrDQqwaNDQAJ
for an explanation of why.

Cheers,
Will

··· On Sat, Apr 29, 2017 at 5:02 AM, wrote:

Hi,

I am trying to create a hidden value that will show me the number of
minutes lapsed from one question to another question.
I am using these calculations.

A hidden value with: double(now())
Another hidden value with: double(now()) - double(#form/log_in_time)
-to represent the time that has passed
Another hidden value with: int(((#form/time_worked*24) -
int(#form/time_worked * 24)) * 60)

  • -to convert the time that has passed into minutes*

Everything seems to be in correctly and I am not sure what I am doing
wrong here, but when I preview it the value keeps coming up on my app as 0
minutes passed. Does anyone know why this is?

I referenced this page in Dimagi: https://help.commcarehq.org/display/
commcarepublic/Calculations+with+Dates+and+Times

Thank you!


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.