Date Comparison
Posted: Tue Mar 16, 2010 2:48 pm
Hi,
I have an if statement that is checking the current date and time against a date and time in the future that is a cut off point.
if ($currentDateTime > $lastDateTime)
I have a problem that I think it isn’t being broken down fully, when the $lastDateTime is the next month (04-04-2010) and $currentDateTime date is (16-03-2010) it says the cut off point has been and gone. If I change the $lastDateTime (17-04-2010) then it works.
Has anyone got any idea what I need to do to get it to check the whole date in one?
Thanks,
Graham
I have an if statement that is checking the current date and time against a date and time in the future that is a cut off point.
if ($currentDateTime > $lastDateTime)
I have a problem that I think it isn’t being broken down fully, when the $lastDateTime is the next month (04-04-2010) and $currentDateTime date is (16-03-2010) it says the cut off point has been and gone. If I change the $lastDateTime (17-04-2010) then it works.
Has anyone got any idea what I need to do to get it to check the whole date in one?
Thanks,
Graham