How can I calculate the date of September 30th of the previous year? I have a query by which I return sales records and I would like to always retrieve all records that date back until September 30th of the year before.
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
How can I calculate the date of September 30th of the previous year? I have a query by which I return sales records and I would like to always retrieve all records that date back until September 30th of the year before.
DATEADD(yy,DATEDIFF(yy,0,GETDATE()),'19000930')
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/