Date Format
Hi:
I'm using the following (Jason) code to turn dates from dd.mm.yyyy to the DB format (yyyy.mm.dd)
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_POST['date'] = "".((isset($_POST["date"]))?date("Y-m-d", strtotime($_POST["date"])):"") ."";
}
?>
How can I make it turn a date entry in the American format, mm.dd.yyyy, to the DB format? I've tried a few combinations but I don't get good results.
Any suggestions?
Thank you for your attention