|
Posted by NC on 03/11/06 20:41
laredotornado@zipmail.com wrote:
>
> I have a MySQL column that's of a DATETIME type. What MySQL function
> can I apply to it in a SELECT statement to make the time midnight? FOr
> example, if a value of the column was
>
> 2006-03-07 21:00:00
>
> I'd like to apply a MySQL function and make the value
>
> 2006-03-07 00:00:00
This should work:
UPDATE mytable
SET myDTcolumn = DATE_FORMAT(myDTcolumn, '%Y-%m-%d 00:00:00');
Cheers,
NC
Navigation:
[Reply to this message]
|