Getting first day of this and next month in sql server

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/1/2015′), 0)

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/28/2015′), 0)

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/3/2015′), 0)

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/1/2015′)+1, 0)

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/28/2015′)+1, 0)

SELECTDATEADD(mm,DATEDIFF(mm, 0,’02/3/2015′)+1, 0)

Leave a Reply

Your email address will not be published. Required fields are marked *