matn89 Posted March 16, 2013 Share Posted March 16, 2013 Hi all. I am grabbing two time stamps from a mysql db and storing them in variables, the timestamps are stored in the format YY-MM-DD HH:MM:SS . Could anyone tell me how I might go about comparing two timestamps that are in this format, I need to check if one is older than the other. Thank you for your time. Link to comment https://forums.phpfreaks.com/topic/275744-compare-time-stamps/ Share on other sites More sharing options...
Barand Posted March 17, 2013 Share Posted March 17, 2013 if ($a < $b) echo "$a is older"; Link to comment https://forums.phpfreaks.com/topic/275744-compare-time-stamps/#findComment-1419077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.