• SQL Server is going to return GetDate as a datetime - which includes the date and the time.

    Since you are wanting this in a very specific format, you might want to use the datepart functions to pull out the pieces of the date and put them back together. This will do that in the format you want - including zero padding the month and day if they are one digit.

    select cast(

    cast(datepart(year,getdate()) as varchar) + -- get the year

    right('0' + cast (datepart(month,getdate()) as varchar),2) + --get the month and zero pad

    right('0' + cast (datepart(day,getdate()) as varchar),2) --get the day and zero pad

    as numeric(10,0)) -- convert back to a numeric(10,0)