Error message with the Format Function

what date type is updatedate defined as? also error could be due to version of your sql server not ssms?

DECLARE @d DATE = '2005-07-01';
DECLARE @dVarchar varchar(10) = '2005-07-01';
SELECT FORMAT(@d, 'MMM-yy') AS Audit_Month, 
       format(cast(@dVarchar as date), 'MMM-yy') as _if_date_is_string,
	   DATENAME(month, @d) as _month,
	   year(@d) _year