Possibly the easiest way to calculate the beginning of the month, is to use the DateAdd function and add a date difference of nothing to the month:
DECLARE @Date datetime SET @Date = GETDATE() SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)
Possibly the easiest way to calculate the beginning of the month, is to use the DateAdd function and add a date difference of nothing to the month:
DECLARE @Date datetime SET @Date = GETDATE() SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)
Related Posts:

Derek Dieter
Site Author
