This is what I do ...dunno if its the best way but it works
Get the date from the database into $the_date
ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})", $the_date, $regs) )
the_date = "$regs[3]-$regs[2]-$regs[1]";
the database stores the date as yyyy-mm-dd when put in with CURDATE(). I use the ereg to break it up into the three components and then rearrange them into dd-mm-yyyy.
If you have the time stored too use
ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2})🙁[0-9]{2})🙁[0-9]{2})🙁[0-9]){2})", $the_date_time, $regs) )
the_date_time = "$regs[3]-$regs[2]-$regs[1] $regs[4]:regs[5]:regs[6]";
which will give you dd-mm-yyy hh:mm:ss
I put it into a function in an include ready for use and also use it in reverse to test if a date entered in a form is valid and then get it into the format that the database stores by default anyway so that the dates are always formatted how I want them no matter what.
hope this helps.