+ 1

Day Statement end of month - 1 ?

In an SQL Statement, i currently See in the Code 2021-02-28, for the Next Month, It would require an manually Update to 2021-03-31, and each Month again and again. SELECT x FROM Y WHERE 2021-02-28 = between StartingDate and EndDate. I want the Date to automatically adjust, end of month - 1. For any given day in April IT should SELECT the end of Month of the previous Month = 2021-03-31. Code ist in TSQL. I SAW an Line for MySQL EOM -1, didnt Work in TSQL. Thx for any Support, which is greatly appreciated.

6th Apr 2021, 10:31 AM
Mahir Ramovic
1 Antwort
6th Apr 2021, 11:13 AM
sneeze
sneeze - avatar