Forum Discussion

DmitriySerebren's avatar
Qrew Member
2 years ago

Destination hous

Good morning, please help me:
Need to calculate the number of hours from two date/time values: [Job Ended] and [Job Started]
Looked at examples in the search, found something formula. But the formula does not work. Empty value:

ToHours(([Job Ended])-([Job Started]))

What am I doing wrong?

Dmitriy Serebrennikov

Ready: ToHours([Job Ended]-[Job Started])

2 Replies

  • Is the field type formula numeric?  On your test record are the start and end date time fields populated?

    Mark Shnier (Your Quickbase Coach)
  • DonLarson's avatar
    Qrew Commander
    [Job Ended]-[Job Started] is a Duration.   You cannot convert it to Hours.   That works on a number like ToHours(8)  gives you a Duration of 8 Hours.

    Your formula field to be set to display Hours as the units.

    Don Larson