I need to change the entry in column from 00-00-0000 to 07/02/1开发者_开发百科999
Thank you.
You should use the standard ISO-8601
For your problem, hope this helped
select date_format(cast('1999/02/07' as date), '%d/%m/%Y');
your schema
select date_format(your_column), '%d/%m/%Y') ...
If you look for update, 1st answer is what you need
You probably meant something else entirely, but as it is phrased, the answer to your question is a query of the form:
UPDATE the_table SET the_column = "07/02/1999" WHERE the_column = "00-00-000"
You may also do it in a script side, whatever your script language you have one function similar to explode() in PHP.
$pieces = explode ('/', $date);
then re-join again using '-'
something like this $newDate = $pieces[0] . '-' . $pieces[1] . '-' . $pieces[2];
精彩评论