I have a string that looks like this: 16-AUG-2008, but I'd like to convert it to:
2008-08-16 00:00:00 for insertion into mysql. I've been trying to do something with strtotime, but I get really funky dates... I'm messing something up...
$date = '16-AUG-2008'; $dbDate = date('Y-m-d', strtotime(str_replace('-', ' ', $date))); echo $dbDate;