SQL Variable current date 1 day

I have a variable that retrieves the current date.

select
  dateformat(getdate(), 'yyyy-mm-dd hh:nn:ss.SSSSSS')

What i want to do is change this so it inserts the current date - 1 day.

Does anyone know the best way around this?

Thanks

Jon Skeet
people
quotationmark

I suspect you want DATEADD:

select dateformat(dateadd(dd, -1, getdate()), 'yyyy-mm-dd hh:nn:ss.SSSSSS')

people

See more on this question at Stackoverflow