date time query
Posted: Wed Nov 24, 2010 8:34 am
I'm picking up a datetime from a database and need to check whether it is greater than 30 minutes old.
e.g.
$date = 2010-11-24 14:12:55
If $date < (now - 30 minutes) then do this
else
do this
but I'm struggling to see how to do this, I can only find examples of static dates e.g. day1 - day2.
I'm sure this must be relatively straight forward.
e.g.
$date = 2010-11-24 14:12:55
If $date < (now - 30 minutes) then do this
else
do this
but I'm struggling to see how to do this, I can only find examples of static dates e.g. day1 - day2.
I'm sure this must be relatively straight forward.