MS SQL -- GetDate(), without -, subtract 7 days ?

Below works, but updates to YYYY-MM-DD with DD of 3006 instead of taking 7 days away.

How can I change so it
 1. updates to YYYYMMDD without "-" and
 2. subtracts 7 days ?

update subscriptions
set parameters =
    substring(parameters, 1, 67)  +
    (select CONVERT(char(10), GetDate()-7,126)) + --ORIGINALLY substring(parameters, 68,8)   +
    substring(parameters, 76, 73) +
    (select CONVERT(char(10), GetDate(),126)) + --ORIGINALLY substring(parameters, 149,8)  +
    substring(parameters, 157, 999)
where subscriptionID in
   (
      --'E6B59B45-2C51-4A6F-906D-CBA4A48371F0',
      '379BC5A4-7F1D-4295-BD11-756154B83789'
   )
finance_teacherAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
let me know if this floats your boat
SELECT CONVERT(char(8), DATEADD(D, -7, GetDate()),112) 

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.