# 🆕 Date-time Math

**URL:** <https://community.glideapps.com/t/date-time-math/15963>\
**Category:** General\
**Tags:** data-editor\
**Created:** [September 17, 2020, 5:47pm UTC](https://community.glideapps.com/t/date-time-math/15963 "2020-09-17T17:47:41Z")\
**Posts on this page:** 7\
**Page:** 7

<div class="post-metadata">

**Author:** ![Michael\_Weiss](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michael_weiss/32/35265_2.png) [@Michael\_Weiss](https://community.glideapps.com/u/Michael_Weiss)\
**Post date:** [June 6, 2022, 9:59am UTC](https://community.glideapps.com/t/date-time-math/15963/124 "2022-06-06T09:59:33Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f8e9d30e22679241e4d600506372efa686c4e82a.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/9/e9f95210dd4964c1871827729347560821a130d4.png)

I checked, the date column is configured as date/time column, and I’m using the special “Now” value.  
I removed the ‘.25’ to void any issue related to comma vs. dot usage.

---

<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:** [June 6, 2022, 10:37am UTC](https://community.glideapps.com/t/date-time-math/15963/125 "2022-06-06T10:37:44Z")

</div>

ah, yes… there was a recent change to the behaviour when you subtract one date from another that means that formula no longer works.

Try this instead: `Floor(Round(Now-Date)/365.25)`

 ![Screen Shot 2022-06-06 at 6.36.05 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/d/8d5c84c7706039bbe8ac55c6fbaad0f9173042d7.png)

---

<div class="post-metadata">

**Author:** ![Michael\_Weiss](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/michael_weiss/32/35265_2.png) [@Michael\_Weiss](https://community.glideapps.com/u/Michael_Weiss)\
**Post date:** [June 6, 2022, 3:05pm UTC](https://community.glideapps.com/t/date-time-math/15963/126 "2022-06-06T15:05:35Z")

</div>

Yes, thanks, this one works. But it gives the age.  
What I need is the time (in days) between now and a birthday, without requiring a person to enter their last birthday.  
So that in a calendar view, I can show upcoming birthdays in the right order.

---

<div class="post-metadata">

**Author:** ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)\
**Post date:** [June 6, 2022, 3:09pm UTC](https://community.glideapps.com/t/date-time-math/15963/127 "2022-06-06T15:09:50Z")

</div>

Maybe this post by Robert will help here!

> [@\#Calendar : Convert a date birth in a recurrent date of birth](https://community.glideapps.com/t/calendar-convert-a-date-birth-in-a-recurrent-date-of-birth/41701/5):
>
> Haven’t tried this for all dates/years—maybe this works in a single math column?

---

<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:** [June 6, 2022, 4:19pm UTC](https://community.glideapps.com/t/date-time-math/15963/128 "2022-06-06T16:19:51Z")

</div>

Take a look at this

> [@Create recurring calendar events in mobile calendars](https://community.glideapps.com/t/create-recurring-calendar-events-in-mobile-calendars/4347/15):
>
> What I would suggest is just show one year at a time, and use a choice component to switch years. I made a small demo app to demonstrate how I would do it. You can make a copy and see if that would work for your use case.

---

<div class="post-metadata">

**Author:** ![federica](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/federica/32/61767_2.png) [@federica](https://community.glideapps.com/u/federica)\
**Post date:** [September 27, 2023, 9:24am UTC](https://community.glideapps.com/t/date-time-math/15963/129 "2023-09-27T09:24:40Z")

</div>

What if I want to add months to that date and not days? Like “Add 3 months to the date of payment” to have an expiring date.

---

<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:** [September 27, 2023, 9:49am UTC](https://community.glideapps.com/t/date-time-math/15963/130 "2023-09-27T09:49:50Z")

</div>

See below:

> [@If then else with DATE](https://community.glideapps.com/t/if-then-else-with-date/11328/23):
>
> @Darren_Murphy @Milan_Balogh Geez, I had to put on my thinking cap before my morning coffee. The same place that Darren got that original formula had a second formula. It looks like that old thread is unlisted now, so I won’t link to it, but the second formula dealt with adding years, and also accounted for leap year, so if you added 1 year to Feb 29th, then the next year if would calculated to Feb 28th instead of March 1st. Essentially it would figure out if the month of the future calculate…

[Previous page](https://community.glideapps.com/t/date-time-math/15963.md?page=6)
