A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Tag Archives: datediff

MySQL: Get difference between 2 dates

Fairly simple and I’m sure this would come in handy in the future. This is one of those functions that I thought did not exist. I should RTFM more… SELECT DATEDIFF(’2009-03-31 23:59:59′,’2009-03-29′); /*would output: 2*/   /*Another usage would be … Continue reading

Posted in General | Tagged , | Leave a comment