sql-servert-sqlsql-server-2008-r2

SQL Server convert date to String MMMYYDD


Im trying to convert date value into this MMMYYDD String format, using native Sql server 2008 r2 function,

I checked here http://www.sql-server-helper.com/tips/date-formats.aspx

and still I can't find matching format.

any ideas?


Solution

  • something like this?

    select convert(varchar(3), @date, 7) + convert(varchar(4), @date, 12)
    

    sql fiddle demo