Help

Dateadd Formula Wrong Result

Topic Labels: Dates & Timezones Formulas
678 5
cancel
Showing results for 
Search instead for 
Did you mean: 
pablog
4 - Data Explorer
4 - Data Explorer

Hi,

I have a database with special dates of each month (Christmas, Halloween, etc). I'm using the DATEADD formula to add 1 year to a date field.

For example, for Christmas I have the date 24/12/2023 and I expect the DATEADD formula to result in 24/12/2024 (field "Próxima Fecha" of my attached screenshot).

However, I'm getting 23/12/2024 as a result. This happens with all the dates (gives 1 day difference).

Is it a bug or I'm missing something?

Thanks!

5 Replies 5

It would be easier if you had included a copy of your formula, but my guess is your using 

DATEADD({Fecha}, 365, "days") which would result is the difference since 2024 is a leap year.  If you change to 
DATEADD({Fecha}, 1, "years") it should work.

Hi @BillH ,

Thanks for your help. You are right, I should have shared my formula.

Is exactly what you suggest (DATEADD({Fecha},1,'year')) and gives 23/12/2024 as a result.

If I test DATEADD({Fecha},365,'days') the result is 22/12/2024 😂

Any advice?

Thanks again

Since it works fine on my base I did some more testing.  My formula field was formatted to display using gmt time, if I change it to local it displays the incorrect date as in your example.

So, as a quick fix you might try looking at the formatting and switching to gmt.  I know this is not a real solution, but it might work for the immediate concern.  There have been multiple discussions on this forum discussing how airtable handles dates and providing workarounds, and I'm sure someone has a better long term solution.  Hopefully they will respond.

If I have more time later in the day I will get back to this.

Yes! That's it!

Thanks a LOT @BillH