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'

  • Create a date variable , assign the value of CONVERT(DATE, DateAdd(yy, - 5, GetDate())) to the variable and use the variable instead in your query. This may be more efficient.

    ----------------------------------------------------