Search

Showing posts with label First Day of Next and Previous Month. Show all posts
Showing posts with label First Day of Next and Previous Month. Show all posts

Monday, April 4, 2011

Get First Day of Next and Previous Month

-- To Get First Day of Next Month
SELECT DATEADD(MONTH, DATEDIFF(MONTH, '19000101', GETDATE()) + 1, '19000101')
as [First Day Next Month];
GO


-- To Get First Day of Previous Month
SELECT DATEADD(MONTH, DATEDIFF(MONTH, '19000101', GETDATE()) - 1, '19000101')
as [First Day Previous Month];
GO