# Date Math Displaying as Hours Instead of Days

**URL:** <https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118>\
**Category:** Ask for Help\
**Created:** [March 26, 2022, 4:46pm UTC](https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118 "2022-03-26T16:46:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLA\_68](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BLA\_68](https://community.glideapps.com/u/BLA_68)\
**Post date:** [March 26, 2022, 4:46pm UTC](https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118/1 "2022-03-26T16:46:50Z")

</div>

I’m trying to do exactly what is depicted here:

> [@new Date-time Math](https://community.glideapps.com/t/date-time-math/15963/2):
>
> Date-time math (e.g. DATEDIFF) is one of the most common Google Sheets formulas that people still rely on in their Glide apps, but as many of you know, relying on Google Sheets formulas can slow down your app, as Glide must wait for your Google Sheet to update, and then for Google to tell Glide about it. When you do your date calculations in Glide, they update instantly! Here you can see how we use this capability in one of our internal apps to calculate the age (in days) of ideas on our backl…

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/ba5776e8ca28494376a9b3ec95bc5d6f513f4af0.jpeg) ](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/ba5776e8ca28494376a9b3ec95bc5d6f513f4af0.jpeg)

But instead I get this result:

 ![Screen Shot 2022-03-26 at 9.37.48 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70f1921894bb65ffe50cd63f1bbe8d964a09a22f.png)

There is no option to configure the display. Any hints on what I’m doing wrong?

---

<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:** [March 26, 2022, 5:09pm UTC](https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118/2 "2022-03-26T17:09:50Z")

</div>

The behaviour of this was changed recently. Subtracting one date from another now gives a duration. To get the result as an integer (days), you need to use either round() or trunc() in your formula.

eg. round(now-date)

---

<div class="post-metadata">

**Author:** ![BLA\_68](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BLA\_68](https://community.glideapps.com/u/BLA_68)\
**Post date:** [March 26, 2022, 9:39pm UTC](https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118/3 "2022-03-26T21:39:13Z")

</div>

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:** [March 27, 2022, 9:39pm UTC](https://community.glideapps.com/t/date-math-displaying-as-hours-instead-of-days/40118/4 "2022-03-27T21:39:33Z")

</div>

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