date("Y-m-d H:i:s") returns the current local date and time, like so:
2001-05-08 17:06:08
What is the best way to determine the difference between that current local date and time and another date and time that was loaded from a database (in that same format) within PHP? Is there something quick and easy or do I have to write some long comparison function?
I already know about the DATEDIFF function in SQL/SQL Server, but I want to do the comparison outside of the database.
Thanks in advance for any suggestions. 🙂