Hi I am using PHP, MySQL and CCS2
Following Problem:
I get a date (
yyyy-mm-dd) out of my MySQL and I want to compare it to the present date
date("Y-m-d")
The Problem is that CCS gets the date as an array, I can change this date with :
$arr_date = $data_source->date_value->GetValue();
$compare_date = $arr_date[1].'-'.$arr_date[2].'-'.$arr_date[3];
so that I can compare the 2 dates
date("Y-m-d") and the
$compare_date.
When the retrieved date is in the future I want to change the outputcolor to red.
I used:
$data_source->date_value->SetValue("<i style=\"color:red;\">".$data_source->date_value->GetValue()."</i>");
But I do not get a propper output, because the date is reset to 01.01.1970. (no color at all, I guess that CSS compares the new term with a date output and can not handel that the date array is now a string)
Does anyone please have a solution or a hint for me?
PS: Please excuse my English, it is not my native language.
Thanks