in reply to Convert US dates to mySQL dates

There has to be a better way to do this - but this should get you through till then.

$test_date = "12-02-2001"; if ($test_date =~ s/^([0-1]?\d)\-([0-3]?\d)\-([0-9]{4})$/$3\-$1\-$2/) +{ print $test_date; } else { print "boom"; }

HTH,

Update thought about it, shortened it and corrected it. Sorry for the original error in it.

EEjack