开发者

How do I have just the date and not the time displayed along with it in a mySQL table?

I have a table containing records of the d开发者_Go百科ate and time each product was purchased. I need to export only the 'date' leaving out the time into another column. How do I do this?


Does not

select name, address, DATE(dateofbirth) from myfriends

not work? eg, just put Date() work?


use the DATE() function.

Here is the manual


I assume you are talking about the results of a SELECT query?

Something like:

select concat(dayofmonth(MyDateTime), month(MyDateTime), year(MyDateTime)) from MyTable;

Should work for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜