Checking recordset date/time is after today's date/time?
How do I check if the date/time from my recordset is after the current date/time?
<?php if ($rsSEARCHEVENTS->getColumnVal("tmsastartdate") > date('Y-m-d H:i:s')) { ?>
This event has already taken place.
<?php } ?>
I've tried various combinations of the above following some Google searching...
<?php if (strtotime($rsSEARCHEVENTS->getColumnVal("tmsastartdate")) > strtotime(date('Y-m-d H:i:s'))) { ?>
This event has already taken place.
<?php } ?>
As ever, when I think I have a handle on things it all comes tumbling down. Would appreciate advice on the above.
Also, if I want to check two values, for example:
<?php if ($rsSEARCHEVENTS->getColumnVal("tmsaeventDELETE") == 1 || $rsSEARCHEVENTS->getColumnVal("tmsastartdate") > date('Y-m-d H:i:s')) { ?>
This event has already taken place.
<?php } ?>
Is it || or && I need? I obviously need to get the date thing sorted though, in order to test this.
Appreciate the help, thank you.
NJ