# Duration between two dates. that display 00 Years, 00 Months, 00 Days

**URL:** <https://community.glideapps.com/t/duration-between-two-dates-that-display-00-years-00-months-00-days/85837>\
**Category:** Ask for Help\
**Created:** [December 31, 2025, 6:45am UTC](https://community.glideapps.com/t/duration-between-two-dates-that-display-00-years-00-months-00-days/85837 "2025-12-31T06:45:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Bahlul\_Amin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mohammad_bahlul_amin/32/93566_2.png) [@Mohammad\_Bahlul\_Amin](https://community.glideapps.com/u/Mohammad_Bahlul_Amin)\
**Post date:** [December 31, 2025, 6:45am UTC](https://community.glideapps.com/t/duration-between-two-dates-that-display-00-years-00-months-00-days/85837/1 "2025-12-31T06:45:22Z")

</div>

How to figure out the duration in the format “00 Years 00 Months 00 Days”

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [December 31, 2025, 9:48am UTC](https://community.glideapps.com/t/duration-between-two-dates-that-display-00-years-00-months-00-days/85837/2 "2025-12-31T09:48:21Z")

</div>

Welcome to Glide.

Have you tried wrapping the duration column inside the math column? By dividing by 24 for hours, 1440 for minutes and 86400 for seconds if and when necessary, subtracting days or minutes when you don’t need them, and playing around with the floor function, you should be able to get the values you need. Finally, put everything together in a template column.

You could probably achieve what you want with a single JavaScript column. You could ask an LLM to generate the code for you.

I think you need to fiddle around a little and try to minimize the amount of computed columns you create for performance.

---

<div class="post-metadata">

**Author:** ![dezwatz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dezwatz/32/77903_2.png) [@dezwatz](https://community.glideapps.com/u/dezwatz)\
**Post date:** [December 31, 2025, 3:22pm UTC](https://community.glideapps.com/t/duration-between-two-dates-that-display-00-years-00-months-00-days/85837/3 "2025-12-31T15:22:35Z")

</div>

Try this! 😀

```javascript
return (() => {
  const now = new Date(); 
  const future = new Date(p1); 
  const diff = future - now; 
  const days = Math.floor(diff / 86400000); 
  const y = Math.floor(days / 365); 
  const m = Math.floor((days % 365) / 30); 
  const d = days % 30; 
  const pad = n => String(n).padStart(2, '0'); return pad(y) + ' Years ' + pad(m) + ' Months ' + pad(d) + ' Days Remaining'; 
})()

```

 ![Screenshot 2025-12-31 102039](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/8/185aa6af4895505a9a0063cf7b4406caeea80c89.png)

 ![Screenshot 2025-12-31 102011](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/410be4381b2ee2b8cb4dce13dc33410d78bdb44d.png)

Set p1 to your future date column
