From: sol beach [mailto:sol.beach@stripped]
> In Oracle TRUNC(data_time_var) returns only the date portion of a
> date_time data type.
> What's the easiest way in MYSQL to accomplish the same thing?
> I tried to RTFM (Paul DuBios' MYSQL tome; 2nd Ed.), but no clean
> solution lept out at me.
> It is a GREAT book, but it did not help me in this case.
SELECT DATE_FORMAT(date_time_var, '%Y-%m-%d')
You can customize what fields you'd like in the second arg. Above will
Also, as of 4.1.1, you can use DATE(date_time_var) to return the date
Mike Johnson Smarter Living, Inc.
Web Developer www.smarterliving.com
mike@stripped (617) 886-5539