I need help converting a submitted string like '12/12/2002' to 2002-12-12.
I've looked for a function, but can't really find one. Thanks, Kevin
Did you look at the [man]datetime[/man] functions? There are many ways to do what you want there. I don't think there is a single function that will convert your string, but [man]strtotime[/man] looks like it might have something.
In case you wanna do this yourself...
$date = "12/12/2002" $datearray = explode("/", $date);
$newdate = "$datearray[2]-$datearray[1]-$datearray[0]";
But I'm sure php has a built in function for this