Get the First Day of the Month in SQL Server

MS SQL To find the start of the month

This code:

DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)

was excuted on 2/3/2010 at 16:11 the result:

01/03/2010 00:00:00

DBA-sentinel