Getting exact time difference from MYSQL datetime field
问题 I want to do what StackOverflow is doing which is saying exactly how long it's been since the last post. There is a catch though, SO displays certain information based on how long the ago the last post was - for example, if the post was less than a day ago, they post how many hours ago the last post was; if the post was less than an hour ago they post how many minutes ago it was, etc. I'm working with a MYSQL DateTime field in the following format: 2012-09-19 13:28:45 I want to compare the