Skip to content
 

Beginning of Month

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)
Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Related Posts:

  • » Generating a Dynamic Date Table to Find Missing Dates
  • » SQL Server Add Primary Key
  • » SQL Server Select
  • » Compare Stored Procedure Dataset Output
  • » Get End of Month
    blog comments powered by Disqus