# How to calculate hours worked from Start time and End time

**URL:** <https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392>\
**Category:** Ask for Help\
**Created:** [July 13, 2022, 10:22am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392 "2022-07-13T10:22:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luther](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/luther/32/17929_2.png) [@Luther](https://community.glideapps.com/u/Luther)\
**Post date:** [July 13, 2022, 10:22am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/1 "2022-07-13T10:22:27Z")

</div>

Hey Gliders 👋,

How do I calculate the number of hours worked from the clock out time and and the Clock in time. I thought it would be straight forward using the math column but I don’t like the answer I get.  
For example for a time period between 07:00 AM and 12:30 AM I get a result of 6:30 which I assume is hours but I am not sure. Any suggestions how I go about this?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 13, 2022, 10:41am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/2 "2022-07-13T10:41:30Z")

</div>

Subtracting one date/time from another will give you a duration in hh:mm:ss.

You just need to ensure both your start and end columns are correctly configured as date/time types, and keep in mind that the underlying value will always include a date - even if you have it configured to display time only.

---

<div class="post-metadata">

**Author:** ![Luther](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/luther/32/17929_2.png) [@Luther](https://community.glideapps.com/u/Luther)\
**Post date:** [July 13, 2022, 10:49am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/3 "2022-07-13T10:49:04Z")

</div>

Hi Darren,

Thanks for your speedy response. I would have expected the same thing you are saying above but i seem to get difference result unless i am missing something

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/2/12c9877ad8325a0e7fad4b1ed87e183bb9bfac4b.png)

This is how the math column is configured as below

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/7/07a920216db081144aa265d2b2c406df8b366276.png)

EDIT:

i think i know what the problem is, I just saw that my clock out time is actually before my clock in time (Lol) due to the AM…It should have been PM…  
My apologies for this silly moment. I should step away from my device now…

---

<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 13, 2022, 11:55am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/4 "2022-07-13T11:55:05Z")

</div>

If you can teach me how to work negative hours in a day, I’m all for learning that technique. 😉

---

<div class="post-metadata">

**Author:** ![Luther](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/luther/32/17929_2.png) [@Luther](https://community.glideapps.com/u/Luther)\
**Post date:** [July 13, 2022, 12:01pm UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/5 "2022-07-13T12:01:32Z")

</div>

🙈🙈…If only the 2 world’s could meet. The virtual and the real world 😂😂

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 31, 2024, 4:54pm UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/6 "2024-10-31T16:54:24Z")

</div>

“For example, a worker will be paid Rp50,000 per hour (in Indonesian currency). If the worker works 8 hours, they will receive Rp400,000. My question is, how do I multiply a time format with a numeric format?”

---

<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:** [November 1, 2024, 12:00am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/7 "2024-11-01T00:00:13Z")

</div>

Sounds like you’re having a duration. Use TRUNC alongside how you’re calculating durations to convert them to a numeric format, before multiplying with the hourly salary.

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [November 1, 2024, 2:07am UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/8 "2024-11-01T02:07:19Z")

</div>

Is TRUNC in the math column?  
`TRUNC(duration in hours) * hourly wage`

---

<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:** [November 1, 2024, 2:57pm UTC](https://community.glideapps.com/t/how-to-calculate-hours-worked-from-start-time-and-end-time/44392/9 "2024-11-01T14:57:26Z")

</div>

Yes, TRUNC should be used in the math column. What’s your current setup?
