This topic is locked
[SOLVED]

 Evaluate date-time field value for today's date

12/19/2020 2:41:04 PM
PHPRunner General questions
A
AlphaBase author

I want to change the row color based upon the field's date-time value for today's date. So the background color might be yellow, for example, if the DT is today's date. I know how to set the color, but not how to evaluate the date-time in PHP/Runner.
e.g. I do this now for another condition in the List's After Record Processed event:

IF ($data["End_Time"] == "") {

$record["css"]="background:#d2ecf4;";

}
A
AlphaBase author 12/20/2020

Okay, I figured it out:


$CurrentDate = date('m/d/Y');

$StartDate = date("m/d/Y", strtotime($data["Start_Time"]));



IF ($StartDate == $CurrentDate) {

$record["Start_Time_css"]='background:#ffff00;';

}