Is there a formula so that when a Date Complete is entered it calculates a total duration from a Start Time field to the Date Complete field in a separate Total field?

  • 1
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Basically, I'm trying to time track certain tasks for my company. I have a field that can Start Time for a task and I'm wondering if an employee can just enter a Date Complete to the task and have a total duration populate in a Total Time field. 

Photo of Jaime

Jaime

  • 282 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
  • 1
Photo of Brendan

Brendan

  • 40 Points
Hi Jaime,

You'll need to create a new field (Total Time field) with the field type set to Formula Duration.

The formula you'll need is:

[Date Complete]-[Start Date]

*This is assuming your Date Complete field and Start Date field are both of the same field type -- Date field.

More on formulas here:

http://www.quickbase.com/user-assistance/#using_formulas_in_quickbase.html


Give this a try and let me know how it goes!
Photo of Jaime

Jaime

  • 282 Points 250 badge 2x thumb
Thank you for getting back to my question so quickly Brendan. I understand the Complete - Start concept, I use it for duration on an hourly scale. Will the formula work if I want to calculate duration between a Start Time and a Date Complete? i.e., [Date Complete]-[Start Time]. They are not the same field type so I wasn't sure. Thanks again for your help.
Photo of Brendan

Brendan

  • 40 Points
Hey Jaime, what are the field types for your Start Time and Date Complete fields?
Photo of Jaime

Jaime

  • 282 Points 250 badge 2x thumb
The Start Time field is a Time of Day type and the Date Complete field is a Date type. I know they are not compatible in a formula but I wasn't sure if there was a work around.
Photo of Brendan

Brendan

  • 40 Points
I don't think there would be a way to do this given those field types.  QuickBase would need to know which Date the Time of Day field was pulling from in order to make that comparison.  

Perhaps you could look into implementing Date/Time fields?  More on those field types here:
http://www.quickbase.com/user-assistance/#field_type_datetime.html
Photo of Jaime

Jaime

  • 282 Points 250 badge 2x thumb
Okay, that makes sense. Thank you again for your time.