none
convert the date into mmm-yy format

    Question

  • Hi All,

    I need sql query to convert the date into mmm-yy format.


    can any one please guide me . it is urgent.


    I have written this query:

    SELECT CONVERT(varchar(3), getdate() )+'-'+right(CONVERT(varchar(11), getdate() ),2)

    it is giving me the exact result.


    But my problem is .this query is returning me to varchar value. And i want this value in data type datetime. As i have defined the column data type in my table is datetime.


    please-please-please guide me.


    Regards,
    Divya Agarwal
    Tuesday, May 26, 2009 6:15 AM

Answers

All replies