I want to select value = 201301
select getdate(), cast(datepart(year, getdate()) as varchar(4))+cast(datepart(MONTH, getdate()) as varchar(2))
it returns 20131
what is the normal way to do this?
This question is related to
sql
sql-server
tsql
SELECT CONVERT(nvarchar(6), GETDATE(), 112)