Hello in my database date / time are in this format
2010-06-01T18:20:25+0000
I’d like to echo that out to time passed since that date / time
e.g.
4 days 3 hours 36 minutes and 4 seconds
is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Below is a function I wrote to do this. Feel free to use it.
To use this func, you’d need to first convert your times to time_t format (integer #seconds since the “epoch”). Either of these PHP functions will probably help with that: http://php.net/strptime or http://php.net/strtotime.