Elapsed Time

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I'm trying to have figure out how to calculate and elapsed time field, in minutes, how long it's been since a record was created.  

Here's the scenario:  This app will be used to check individuals in to our lobby, and track the number of visitors our receptionists are working with on a daily basis.  I'd like to calculation to be from the number of minutes since they arrived, to right now, this minute.

I'm thinking something like this, but it's not working in a Forumla-numeric field:

ToMinutes(ToTimeOfDay()-[Arrival Time])

Help?
Photo of Jay (DDS)

Jay (DDS)

  • 430 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
ToMinutes(now()-[Arrival Time])
Photo of Jay (DDS)

Jay (DDS)

  • 430 Points 250 badge 2x thumb
so, I tired that first, and got this error:

The expression Now() on the left hand side of the operator "-" is of type date/time while the expression [Arrival Time] on the right hand side is of type timeofday. The operator "-" cannot be used with these types of expressions.

I'm assuming I need to make a field entitled Now, then use that field reference in place to the Now() expression?

Just doesn't seem very clean.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Formula-Duration field, with smart units, or set to minutes.

ToTimeOfDay(Now())-[Arrival Time]

That should give you the time between the two.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Thx Matthew.  I had posted an update to my response that would have been this below, but I must not have saved it correctly.


This would be a numeric field type.

ToMinutes(ToTimeOfDay(now())-[Arrival Time])


.