Q: Format GETDATE() in SQL Server I'm trying to get yy-MM, I tried this but it doesn't work
DECLARE @Date VARCHAR(10) = CONVERT(date, DATEADD(month, -1, CONVERT(date, GETDATE(), 'yy-MM')));
SELECT @Date AS [Date]

How to make it return 2020-03 rather than 2020-03-30?

A: 
How to make it return as 2020-03 rather then 2020-03-30?

Are you looking for this?
SELECT convert(varchar(7), getdate(), 126) 

Output
2020-04

Demo Here
