SQL Query to find the last day of the month

前端 未结 14 1812
太阳男子
太阳男子 2020-11-27 04:40

I need to find the last day of a month in the following format:

\"2013-05-31 00:00:00:000\"

Anybody please help out.

14条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 05:24

    select DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-0, -1) LastDate

提交回复
热议问题