Formatting Date Field in Query

  • Hi,

    In my query, I need "dd-mmm-yyyy" format of date for date fields.

    I searched in help for Format command for SQL, but could not find one.

    Any guideline or help will be appriciated.

    Thanks

    Nilesh Leuva

  • Hello,

    You may want to use Convert function. See Cast and Convert topic in Books Online.

    CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

    You may also use MONTH, DAY and YEAR functions for formatting. See Date and Time Functions topic in Books Online.

    You may have not so much responses because you put your question in Administering SQL Server 2005 (Yukon) forum. You may want to repeat the question if you would like in SQL Server -> Administration forum

    Regards,

    Yelena

    Regards,Yelena Varsha

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply