convert datetime to date
Need to grab just the date from the datetime in MySQL. Have done this in MSSQL:
----------------------------------------------------------------------------------
Select convert(varchar,convert(varchar,start_time,101)) as [date], video_name, username
from log
where company_id = 'c.company_id'
AND (end_time - start_time) > '00:03:000'
group by convert(varchar,convert(varchar,start_time,101)), video_name, username
order by convert(varchar,convert(varchar,start_time,101)), video_name, username
example:
Start Time Video Name User
------------ -------------- -----
8/24/2004 tVideoName bob
----------------------------------------------------------------------------------
The convert function is giving me problems in MySQL when I attempt to use this:
----------------------------------------------------------------------------------
replace(convert((VARCHAR,start_time,3),'/','/')
----------------------------------------------------------------------------------
I'm doing something wrong, can some please help.
Thanks,
Chris