Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.1.3
-
None
-
None
Description
I use an output_date_format option on the add_months() function like so:
select add_months(dt, -2, 'YYYY-MM')
On leap day, 2024-02-29, this incorrectly returned 2024-12. I expected 2023-12. All other days it works fine, only leap day it gave the wrong result.
Omitting the output date format will make it calculate the date correctly. Including the output date format gives the wrong result.