Hi there i have this code
if ((date('m/d/Y' , $row->dates)) <= (date('m/d/Y', strtotime("-3 day"))) )
The basic idea is that i pull a date that from my database ($row->dates) and see whether today’s date is more than 3 days further along than the date in the database.
This was working perfectly for dates in 2012 up until 2013 hit. It now always hits the else condition for pulled dates containing 2012, and the 2013 dates now work perfectly.
The dates that are stored in the database are in unix timestamp form ie 1351141261.
I can’t quite figure out where it is i am going wrong in comparing the two dates. Obviously there is something in the year section screwing things up. Could anyone help?
Why do you convert the date to a string?