declare @Date datetime set @Date = '2009/10/17' Select dateadd(day, 0 - day(dateadd(month, 1 , @Date)), dateadd(month, 1 , @Date))
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)