# Extract only the hours from math computation

**URL:** <https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603>\
**Category:** Ask for Help\
**Created:** [July 3, 2024, 9:19pm UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603 "2024-07-03T21:19:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jackson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackson/32/77196_2.png) [@Jackson](https://community.glideapps.com/u/Jackson)\
**Post date:** [July 3, 2024, 9:19pm UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603/1 "2024-07-03T21:19:07Z")

</div>

I’m trying to extract only the first two hour digits of a calculation result (such as `16:00:34` ) in Glide. I would like the new column to show `16` if the original column value is `16:00:34`… I was instructed to: Create a template column, and because I’m using a math column, a formula `HOUR(NOW())` or `LEFT({Time}, 2)` would work, but it’s not. Here is a screenshot of what’s happening.

 ![Screenshot 2024-07-03 at 2.06.06 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/c/9c04fa6b2347ce29446416249f048180a12efcf6.png)

---

<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:** [July 3, 2024, 10:30pm UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603/2 "2024-07-03T22:30:15Z")

</div>

HOUR(Date) or HOUR(Now) or HOUR(Now-Date) should all work in a math column as long as you are working with date type columns and durations.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 3, 2024, 11:38pm UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603/3 "2024-07-03T23:38:27Z")

</div>

> [@Jackson](#):
>
> I was instructed to: Create a template column, and because I’m using a math column, a formula `HOUR(NOW())` or `LEFT({Time}, 2)` would work, but it’s not.

Based on your previous thread, it looks like you’re trying to use AI for instructions. I believe the Glide docs, or this forum, is better equipped to assist you with that, to prevent hallucinations.

> **[Math Column | Glide Docs](https://www.glideapps.com/docs/math-column)**
>
> Perform instant calculations using the data in your app.

---

<div class="post-metadata">

**Author:** ![Jackson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackson/32/77196_2.png) [@Jackson](https://community.glideapps.com/u/Jackson)\
**Post date:** [July 4, 2024, 1:36am UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603/4 "2024-07-04T01:36:40Z")

</div>

To: ThinhDinh,  
The Math Column video and information resolved my problem. Thank you

---

<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:** [July 11, 2024, 1:37am UTC](https://community.glideapps.com/t/extract-only-the-hours-from-math-computation/74603/5 "2024-07-11T01:37:38Z")

</div>

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