What I have right now is:
$somevar = ($progress_date != ('0000-00-00 00:00:00' || '//'))?$progress_date:'NA';
and it doesn’t ever spit out $progress_date. It defaults to always printing ‘NA’ instead.
Doing this and using fewer () to separate things
$somevar = ($progress_date != '0000-00-00 00:00:00' || '//')?$progress_date:'NA';
makes it so $progress_date always spits out, even when the date is set to a string of 0’s.
Is there a way using a ternary statement to catch both blank dates and dates set to 0 so that ‘NA” gets printed out?
Looks like what you actually want is a pair of conditions with
&&.You need to have two sides to each boolean comparison, so you cannot do :
Instead make the full comparison on both sides. Read out loud, it makes sense as what you need: Progress date is not equal to thing1 and progress date is also not equal to thing2