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.
精彩评论