# ARRAYFORMULA to calculate DATE that is one year later than the given date?

**URL:** <https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456>\
**Category:** Ask for Help\
**Created:** [February 9, 2021, 2:01am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456 "2021-02-09T02:01:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcclurefaith](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mcclurefaith](https://community.glideapps.com/u/mcclurefaith)\
**Post date:** [February 9, 2021, 2:01am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456/1 "2021-02-09T02:01:00Z")

</div>

I have dates in Column X

=IF(X2\<\>“”, DATE(YEAR(X2)+1,MONTH(X2),DAY(X2)), “”)

gives me the date one year later as I want it (must be in a date format, so I can show in calendar view)

BUT I get an error with:

=ARRAYFORMULA(IF(X2:X\<\>“”,DATE(YEAR(X2:X)+1,MONTH(X2:X),DAY(X2:X)),“”))

What am I doing wrong?

Or, can I do this without using an ARRAYFORMULA? (I was able to produce the date in text format using math and template columns, but could not display the date in calendar view)

---

<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:** [February 9, 2021, 2:08am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456/2 "2021-02-09T02:08:03Z")

</div>

You can do this in the Glide Data Editor using [Date Math](https://docs.glideapps.com/all/reference/data-editor/computed-columns/math-column/date-time-math). I can’t give you the formula without causing myself an aneurysm, but I’m sure @Jeff_Hager will help you out 🙂

---

<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:** [February 9, 2021, 2:15am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456/3 "2021-02-09T02:15:28Z")

</div>

Check your quotes. When I copy/pasted your original, it contained “smart quotes”.

This works for me:

```auto
=ARRAYFORMULA(IF(D2:D<>"", DATE(YEAR(D2:D)+1,MONTH(D2:D),DAY(D2:D)), ""))

```

But regardless, much better to do this in the GDE (unless you actually need the data in the Google Sheet).

---

<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:** [February 9, 2021, 2:20am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456/4 "2021-02-09T02:20:16Z")

</div>

Here’s the glide way. Just plug in 1 year.

> [@Fun with Dates](https://community.glideapps.com/t/fun-with-dates/21684/77):
>
> Here you go. Just use 1.5 years for the number of years, or you can take your number of months and divide by 12. Same thing either way.

---

<div class="post-metadata">

**Author:** ![mcclurefaith](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mcclurefaith](https://community.glideapps.com/u/mcclurefaith)\
**Post date:** [February 9, 2021, 4:00am UTC](https://community.glideapps.com/t/arrayformula-to-calculate-date-that-is-one-year-later-than-the-given-date/22456/5 "2021-02-09T04:00:59Z")

</div>

Thank you! I was able to calculate one year later and 11 months later 😅
