First Day of a Month

Kirthiga
Posted by Kirthiga under Sql Server category on | Points: 40 | Views : 924
Declare @FirstDay datetime='2013-02-25'
select DATEADD(MM,DATEDIFF(MM,0,@FirstDay),0) [FirstDay Of a Month]

Comments or Responses

Posted by: Pandians on: 5/22/2013 Level:Silver | Status: [Member] [MVP] | Points: 10
In Another way!
Declare @FirstDay datetime='2013-02-25'

SELECT @FirstDay - DAY(@FirstDay)+1

Login to post response