How to convert a cell with a duration (datetime difference) to number in Numbers

numbers

I have four fields in Numbers on macOS:

  1. F1: datetime
  2. F2: datetime
  3. F3: duration
  4. F4: number

The dateime-fieds contain only a time, like:

10:00    11:00
11:00    12:30
13:00    13:15

The duration-field is calculated by this formular:

F2 - F1

And shows something like:

1h
1h 30m
15m

This works fine.


Now I want to calculate F4 which is a number representation of the duration-field F3. For the examples above it should result in:

1
1.5
0.25

Unfortuanteley I can't find a way to achieve this. How can this be solved?


What I've tried so far:

  • changing the fomatting to number didn't work as it will always reset to duration
  • setting the field F3 to seconds-only and then calculating F3 / 3600, but the result will always be a new duration

Best Answer

Use the DUR2HOURS() formula.

DUR2HOURS(F3)

Pass the duration from F3 to the formula.

Duration to hours example