I am currently using PHP / MySQL and the jQuery timeago plugin. Basically, I need to pull my timestamp out of the database and convert it to the ISO 8601 format.
Like this 2008-07-17T09:24:17Z
My timestamps are currently in the database in this format:
0000-00-00 00:00:00
I tried using timeago with my formatted timestamp, but this does not work. He just says "less than a minute ago."
However, when I hardcode it in ISO 8601 format, it works. So I need help:
1) Using SELECT statement to convert my timestamp to ISO 8601 format
2) Or, SELECT a timestamp, and then convert to ISO 8601 with PHP.
Many thanks!
source share