Retrieve the First day of the month in SQL

Madhu.b.rokkam
Posted by Madhu.b.rokkam under Sql Server category on | Points: 40 | Views : 1935
--First Day of the month
Select DATEADD(mm,DATEDIFF(mm,0,getdate()),0)


This returns the date of First day of the month.

Result

2011-04-01 00:00:00.000

Comments or Responses

Posted by: Jayeshl on: 6/28/2011 Level:Starter | Status: [Member] | Points: 10
thanks

this will help me to solve my Program issue

jayeshl
http://www.sqlassistant.blogspot.com

Login to post response