convert(varchar(8), getdate(), 112);
orconvert(varchar, getdate(), 112)
Source: sql server – Convert a date to yyyymmdd format – Database Administrators Stack Exchange
convert(varchar(8), getdate(), 112);
orconvert(varchar, getdate(), 112)
Source: sql server – Convert a date to yyyymmdd format – Database Administrators Stack Exchange