Dec 13, 2023 06:02 AM
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!
Dec 13, 2023 06:55 AM
It would be easier if you had included a copy of your formula, but my guess is your using
Dec 13, 2023 07:05 AM
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
Dec 13, 2023 07:21 AM
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.
Dec 13, 2023 07:28 AM
I knew Kuovonne had an explanation better than mine...
https://community.airtable.com/t5/formulas/dateadd-formula-isn-t-working-correctly/td-p/38577
Dec 13, 2023 07:38 AM
Yes! That's it!
Thanks a LOT @BillH