SQL query to find last day of current month?

后端 未结 3 1451
深忆病人
深忆病人 2020-12-29 16:05
SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0))
 LastDay_CurrentMonth

Hi everyone I have a query to find the last day of current mont

3条回答
  •  孤独总比滥情好
    2020-12-29 16:29

    This will give you the last day of current month but ignores time

    select EOMONTH(GETDATE())

    From Microsoft tech net

提交回复
热议问题