+ 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.
1 Odpowiedź
0
Are you looking for EOMONTH()
https://www.sqlservertutorial.net/sql-server-date-functions/sql-server-eomonth-function/
Please add sql to the tags