Tech News

How to find Last Day of Any Month?

  • Last Day of Previous MonthSELECT DATEADD(s,-1,DATEADD(mmDATEDIFF(m,0,GETDATE()),0))
  • Last Day of Current MonthSELECT DATEADD(s,-1,DATEADD(mmDATEDIFF(m,0,GETDATE())+1,0))
  • Last Day of Next MonthSELECT DATEADD(s,-1,DATEADD(mmDATEDIFF(m,0,GETDATE())+2,0))


Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x