Conditional format when date passed?

QuestionsConditional format when date passed?
Gary Brett asked 5 years ago

Hi Abu, trying to get the conditional format on your demo to highlight the date cell when a date is in the past but, is it possible?

// If date is < than today, highlight row with red
$f = array();
$f["column"] = "invdate_calc";
$f["op"] = ">";
$f["value"] = "curdate()";
$f["class"] = "focus-row";
$f_conditions[] = $f;

Thank you

1 Answers
Abu Ghufran answered 5 years ago

I believe you have already set:

$g->select_command = "SELECT, 10 as jid, invdate, date_format(invdate,'%Y%m%d') as invdate_calc …. "

This means it will have 20140523 date notation.

So, to highlight you can set the $f["value"] via php date function.

$f["value"] = date("Ymd");

Your Answer

8 + 20 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?