sql - Output year and month with a string -
trying output like:
2016,11
using this:
select convert(varchar(20),year(getdate()) + ',' + month(getdate())) yearmonth
am missing in convert? because getting error:
conversion failed when converting varchar value ',' data type int.
thanks
try this.
select convert(varchar(20),year(getdate())) + ',' + convert(varchar(20), month(getdate())) yearmonth
Comments
Post a Comment