SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict tina88's Avatar
    Join Date
    Jan 2007
    Location
    UK
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    forum last post details?

    Hiya everyone, I am building a mini forum for a site and am wondering how to get the last post details to display like 3 minutes ago, 4 hours ago, yesterday, 5 May 2007 for when the last post was added. I have a timestamp in both the thread and comment tables.

    Thanx x

  2. #2
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just compute the difference between the current timestamp and the timestamt of the last post and the divide by 60, for instance, to learn the difference in hours.

  3. #3
    SitePoint Addict tina88's Avatar
    Join Date
    Jan 2007
    Location
    UK
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh ok, that makes sense thanx


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •