Hi
I need to compare if the actual date is greater or not than the end _date and finish_date stored in datetime format in mysql db
i am trying this script:
function getDateForMysqlDateField() {
$date = getDate();
foreach($date as $item=>$value) {
if ($value < 10)
$date[$item] = "0".$value;
}
return $date['year']."-".$date['mon']."-".$date['mday']." ".$date['hours'].":".$date['minutes'].":".$date['seconds'];
}
$actual_data = getDateForMysqlDateField();
if($dth_start") > $actual_date && $rs->field("dth_end")< $actual_date ) {
echo "open";
} else {
echo "closed";
}
but is always returning closed. wich is the right way to compare dates ?
thank´s in advance