Can i insert date in mySQL in “DD-Mon-YY” format"?

前端 未结 2 1930
陌清茗
陌清茗 2021-01-27 17:14

Mysql support this format YYYY-MM-DD by default. But what if i want to insert date in this format \"dd-Mon-yyyy\" in mysql?? Is there any way so that i can insert the manual dat

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-27 17:24

    Try This Format:-

    SELECT DATE_FORMAT(NOW(),'%d-%b-%Y')
    

    This will result as:-

    10-Sep-2014

    Hope this will helpful to you.

提交回复
热议问题