开发者

How do I format a date column in MySQL?

My query r开发者_开发百科eturns the row value as "2/27/2010 12:00:00 AM" but I need to get "2/27/2010". What do I use to get the format as I need it for MySQL?


Use:

SELECT DATE_FORMAT(your_date_column, '%c/%d/%Y') FROM table
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜