Hello, need to create a table view that contains only records with the expired date (older than today) stored in the column named 'polTerm'.
The problem is that data is stored as string like 23.05.2019 ( dd.mm.yyyy); meaning it should be converted somehow.
So - the question is - how can I write the WHERE conditions in DB ReadData function to have this accomplished?
I have working code that hightlights the date in the table; now i want to show only those rows that contains expired date:
Elita
The problem is that data is stored as string like 23.05.2019 ( dd.mm.yyyy); meaning it should be converted somehow.
So - the question is - how can I write the WHERE conditions in DB ReadData function to have this accomplished?
I have working code that hightlights the date in the table; now i want to show only those rows that contains expired date:
$polterm = $this->get('submissions_list.row.Submission.polTerm'); // stored as DD.MM.YYYYThank you in advance-
$endDate = new DateTime($polterm);
$curdate = new DateTime(date('d.m.Y'));
if($curdate > $endDate){
echo '<div style="color: red;">'.$this->get('submissions_list.row.Submission.polTerm').'</div>';
}else{
echo $this->get('submissions_list.row.Submission.polTerm');
}
Elita