1. The first day of a month Select dateadd (mm, datediff (mm, 0, getdate (), 0) 2. Monday of the week Select dateadd (wk, datediff (wk, 0, getdate (), 0) 3. The first day of the year Select dateadd (YY, datediff (YY, 0, getdate (), 0) 4. The first day of the quarter Select dateadd (QQ, datediff (QQ, 0, getdate (), 0) 5. midnight of the day Select dateadd (DD, datediff (DD, 0, getdate (), 0) 6. Last day of last month Copy and save Select dateadd (MS,-3, dateadd (mm, datediff (mm, 0, getdate (), 0 )) 7. Last day of last year Select dateadd (MS,-3, dateadd (YY, datediff (YY, 0, getdate (), 0 )) 8. Last day of the month Select dateadd (MS,-3, dateadd (mm, datediff (M, 0, getdate () + 1, 0 )) 9. The last day of the year Select dateadd (MS,-3, dateadd (YY, datediff (YY, 0, getdate () + 1, 0 )) 10. the first Monday of this month Select dateadd (wk, datediff (wk, 0, dateadd (DD, 6-datepart (day, getdate (), getdate (), 0) |