Home Forums SQL Server 2008 T-SQL (SS2K8) GetDate() 5 Years ago without time formated 'YYYY-MM-DD' RE: GetDate() 5 Years ago without time formated 'YYYY-MM-DD'

  • Since we're talking about SQL Server 2008 here, any issue with using the date type?

    SELECT CONVERT(DATE, DateAdd(yy, - 5, GetDate()));


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/