Home Forums SQL Server 2005 T-SQL (SS2K5) DateAdd together with DateDiff RE: DateAdd together with DateDiff
djyoungberg
SSC Enthusiast
Points: 100
More actions
May 10, 2012 at 7:39 pm
#1486075
Are you simply wanting to get the first day of the month?
SELECT DATEADD(MONTH,DATEDIFF(MONTH,0,'5/10/2012'),0)
This returns '5/1/2012'