# Convert Duration Format to Decimal

**URL:** <https://community.glideapps.com/t/convert-duration-format-to-decimal/79781>\
**Category:** Ask for Help\
**Tags:** date-math\
**Created:** [February 5, 2025, 1:01am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781 "2025-02-05T01:01:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Motte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/motte/32/84781_2.png) [@Motte](https://community.glideapps.com/u/Motte)\
**Post date:** [February 5, 2025, 1:01am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/1 "2025-02-05T01:01:48Z")

</div>

![Screenshot 2025-02-04 at 2.33.20 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/c/cc6ad22162de4ead57608496eb6005a0a29603ce.png)

I have created a CURRENT DURATION column by subtracting CURRENT START from CURRENT STOP (both are date / time columns) and - as desired - it gives me elapsed hours:minutes:seconds in duration format.

So I try to do math on that column but the my reference to HOUR(DURATION) in the CURRENT ELAPSED TIME is zero - NOT 24. Thus my math doesn’t work (I should get 24.5).

How to I get hours and minutes out of the elapsed time column in duration format to create a decimal hours elapsed (looking to get 24.5 in this example)?

Thanks

Motte

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 5, 2025, 1:30am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/2 "2025-02-05T01:30:22Z")

</div>

Round your duration.

`Round(d,1)`

---

<div class="post-metadata">

**Author:** ![Motte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/motte/32/84781_2.png) [@Motte](https://community.glideapps.com/u/Motte)\
**Post date:** [February 5, 2025, 1:58am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/3 "2025-02-05T01:58:39Z")

</div>

Thanks Jeff - I’m not sure that’s what I’m looking for. I’m trying to find out how to reference HOURS and MINUTES in a DURATION column that is the result of a STOP date and time minus a START date and time.

HOUR(DURATION) is only 3 if 27 hours have passed. It doesn’t return the expected 27 hours.

Am I missing something in your explanation?

---

<div class="post-metadata">

**Author:** ![Motte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/motte/32/84781_2.png) [@Motte](https://community.glideapps.com/u/Motte)\
**Post date:** [February 5, 2025, 2:01am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/4 "2025-02-05T02:01:58Z")

</div>

To simplify - if I have a value of 28:30:00 in a DURATION column that is the result of subtracting one date and time from another, how to I reference the 28 and the 30 in a math function? HOUR(DURATION) doesn’t return 28 - it returns 4.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 5, 2025, 2:12am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/5 "2025-02-05T02:12:32Z")

</div>

All date math calculates as days or decimals of days. Your stop-start will result in the number of days difference, but formats that result as a duration. If you want that as hours, multiply by 24. Then round that result to break it out of the duration format. So to modify the formula I gave you…

`Round(d*24,1)`

Don’t try to pick out parts of the duration because it’s not actually a time.

---

<div class="post-metadata">

**Author:** ![Motte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/motte/32/84781_2.png) [@Motte](https://community.glideapps.com/u/Motte)\
**Post date:** [February 5, 2025, 2:35am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/6 "2025-02-05T02:35:48Z")

</div>

![Screenshot 2025-02-04 at 9.32.48 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/f/9f3306b824994e0703b8eb91c0da29a8974392be.png)

Wow. Thank you so much. I’ve tried many different approaches. I had to use ROUND(D_24,2) to get the minutes right. 45 minutes showed up as .80. With ROUND(D_24,2) rather than ROUND(D\*24,1) it got the minutes as .75.

Here’s the detail screenshot for the next poor sap that is spending all night trying to do this.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 12, 2025, 2:36am UTC](https://community.glideapps.com/t/convert-duration-format-to-decimal/79781/7 "2025-02-12T02:36:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
