开发者

How do I format a date column in MySQL?

开发者 https://www.devze.com 2022-12-29 23:18 出处:网络
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:

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

精彩评论

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

关注公众号