ColdEdge Posted July 20, 2010 Share Posted July 20, 2010 Allright, here is the thing. I want to display user post/comment... ect.. ect in a manner that shows something 5 hours ago1 minute ago2 days ago1 month ago1 year agohow would I be able to do this?currently its displayed as: 07-10-10, 04:42 PM Link to comment Share on other sites More sharing options...
Synook Posted July 20, 2010 Share Posted July 20, 2010 Convert the string into a timestamp (using strtotime()), get the current time (using time()), calculate the difference and convert that into the format you want (you'll have to write your own function for that part). Link to comment Share on other sites More sharing options...
End User Posted July 20, 2010 Share Posted July 20, 2010 This may work for you:http://psoug.org/snippet/Get-Relative-Date...d-Times_943.htm Allright, here is the thing. I want to display user post/comment... ect.. ect in a manner that shows something 5 hours ago1 minute ago2 days ago1 month ago1 year agohow would I be able to do this? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.