Date Format (ii)
Hi:
The following code transforms the US date format mm-dd-yyyy to the DB format with no problem:
<?php require_once('Connections/dennfree.php'); ?>
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_POST['S_date'] = "".((isset($_POST["S_date"]))?date("Y-m-d", strtotime(str_replace("-", "/", $_POST["S_date"]))):"") ."";
}
?>
However. when using that very same code for doing a date-range search, it just doesn't work. In contrast, when entering the date in the European format dd-mm-yyyy the date-range search works well.
Any suggestions on how to solve this?
Just in case, attached please find the date-range search page in question with the dd.mm.yyyy format coded.
Thank you for your attention.