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) 

sqlfiddle demo


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -