sql - How to concat values which retrieved from database -
i executing query in sql server 2008
select (convert(date, getdate()))
and shows result 2013-07-22
.
i need print result 22713
, 22 date 7 month 13 year.
how this?
select cast(datepart(dd,getdate()) varchar(10)) +cast(datepart(mm,getdate()) varchar(10)) +right(cast(datepart(yy,getdate()) varchar(10)),2)
Comments
Post a Comment