To change date format in sql

前端 未结 3 476
无人及你
无人及你 2020-12-22 02:37

I have date in mm/dd/yyyy format in database.I want to display in form as dd/mm/yyyy. Can anybody help?I want to get time along with date.

3条回答
  •  囚心锁ツ
    2020-12-22 03:09

    What Guffa said, plus this from books online: http://msdn.microsoft.com/en-us/library/aa226054.aspx

    CONVERT(VARCHAR(10), column, 103)

    103 is yyyy
    3 is yy

提交回复
热议问题