Select * from TableName where Dateandtime = '2014-03-01 00:00:00'
Dateandtime = Convert(Datetime, datepart(yyyy,Getdate()+'-'+datepart(mm,Getdate()+'-'+'01 00:00:00'),120)
where Dateandtime = DATEADD(month,month(getdate())-1,DATEADD(year,year(getdate())-1900,0))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)