Convert date from yyyy-mm-dd to dd month_name year [duplicate]

北城以北 提交于 2019-12-03 01:02:21

问题


I have stored date in MySQL in the format yyyy-mm-dd and I wish to display it on the form like

ddMMMMyyyy

How can I do that


回答1:


Use DATE_FORMAT()

select date_format(date_column, '%d %M %Y')
from your_table



回答2:


Try it.

CONVERT(VARCHAR(11),GETDATE(),106)


来源:https://stackoverflow.com/questions/21160915/convert-date-from-yyyy-mm-dd-to-dd-month-name-year

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!