# Can we add add a entire year into a trigger action

**URL:** <https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401>\
**Category:** Ask for Help\
**Created:** [July 13, 2022, 1:03pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401 "2022-07-13T13:03:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)\
**Post date:** [July 13, 2022, 1:03pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/1 "2022-07-13T13:03:13Z")

</div>

Hello, I would like to know if we can create an action to add 1 year in a column, I know I can do it with math with +365, but I have to add exactly one year.

Like if my date is 31.12.2022 I want 31.12.2023 or 12.05.2022 want to be 12.05.2023 and not 13 or 12 (depend fo the actual year)

Maybe someone now a trick with template or ? Or someone knows the value of a year in math ?

Thank’s for help !

---

<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, 1:20pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/2 "2022-07-13T13:20:06Z")

</div>

Is the format important, and does the return value actually need to be a date?  
If you’re okay with `yyyymmdd` format, then a really simple option is to use a Math column.

```auto
(Year(Date)+1)*10000
+ Month(Date)*100
+ Day(Date)

```

 ![Screen Shot 2022-07-13 at 9.16.09 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/e/ee84e936bbb09dfc0ccb01b04b9972cf82d089bc.png)

I guess it depends what you’re doing with the resultant value. If you’d be using it to create a relation (for example), then it’s actually a good idea to convert your dates to integers, as this removes the time component from the date - which can cause problems if you’re using dates in relations.

---

<div class="post-metadata">

**Author:** ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)\
**Post date:** [July 13, 2022, 1:28pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/3 "2022-07-13T13:28:11Z")

</div>

I want add a year in a trigger action with set columns (clic into a button and then it’s gonna add a year into our column).

I gonna try with your idea, maybe I can do it.

---

<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, 1:38pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/4 "2022-07-13T13:38:19Z")

</div>

hmm, if you want to use that to do a Set Column value on an existing date/time column you’ll probably find that it doesn’t work.

So perhaps the below will be a better option in your case:

> [@Glide Editor screen goes blank when using Math Column](https://community.glideapps.com/t/glide-editor-screen-goes-blank-when-using-math-column/19646/15):
>
> Edit: I have some updates to this formula that I’ve explained in the post below. You’re requirement to back Feb 29th by a day if it’s not a leap year does complicate it a bit, but that’s not a problem. It just makes for a formula that’s much larger. Here is the formula if we were to allow Feb 29th to roll over to Mar 1st. ((Now-DAY(Now)+15)+(Years\*365.25)) - DAY((Now-DAY(Now)+15)+(Years\*365.25)) + DAY(Now) ‎ ‎ ‎ ‎ ‎ To get the leap year date of Feb 29th to back date to Feb …

You’ll just need to decide what happens if todays date is Feb 29 😉

---

<div class="post-metadata">

**Author:** ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)\
**Post date:** [July 13, 2022, 1:41pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/5 "2022-07-13T13:41:32Z")

</div>

> [@Darren\_Murphy](#):
>
> `(Year(Date)+1)`

It’s working I just change the base of your idea.

 ![Capture d’écran 2022-07-13 à 15.39.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41dc9c8fe8678ee584f040b043e365a7f87c7da1.png)

I just separated the year the month and the day, and create a template and all is good.

---

<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, 2:29pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/6 "2022-07-13T14:29:02Z")

</div>

I actually have an updated version of that formula, which I think takes care of a couple of odd issues when adding months to a date that results in the end of February. Probably doesn’t matter for your use case of adding a full year, but if you ever use it for adding months, then I would recommend the new version instead. (I should update my original post)

> [@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…

You could also consider using the EDATE Excel formula in the Excel Formula plugin. Not sure how well it works, but something to try. I think you would use a formula like this.

`=EDATE(A1,12)`

---

<div class="post-metadata">

**Author:** ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)\
**Post date:** [July 13, 2022, 4:02pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/7 "2022-07-13T16:02:36Z")

</div>

Thank you for your solution, in our case we don’t need to add a month that’s why this solution suits me. We have contracts that renew tacitly (but not automatically) so we only need to extend the expiry date by one year.

---

<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, 4:40pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/8 "2022-07-13T16:40:19Z")

</div>

That’s fine. Just be aware if you ever have a February 29th leap year situation. Adding a year could give you an invalid date if you aren’t careful.

---

<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:** [July 14, 2022, 4:41pm UTC](https://community.glideapps.com/t/can-we-add-add-a-entire-year-into-a-trigger-action/44401/9 "2022-07-14T16:41:11Z")

</div>

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