The MU forums have moved to WordPress.org

Enable Commentdate in Sidebar? (2 posts)

  1. sepp88
    Member
    Posted 14 years ago #

    Hi there,

    i'm using the sitewide comments plugin for a wpmu. I'm using a custom date-format om my blog.

    $sql = "SELECT blog_id, comment_ID, comment_post_ID, comment_author,
    		     comment_date, comment_date_gmt, comment_approved, comment_type, comment_author_url, user_id, comment_content,
    		     SUBSTRING(comment_content,1,250) AS com_excerpt FROM $site_comments
    		     WHERE comment_approved = '1' AND comment_type = ''
    		     ORDER BY comment_date_gmt DESC
    		     LIMIT 50";

    $output .= $comment->comment_date

    Even though i use "d.m.Y" as Dateformat and "H:i" as Timeformat comment_date for my sitewide-comments-widget always shows 2009-09-24 15:08:03.

    I have no idea how i can convert that to my normal date and timeformat. Things like $output .= $comment->comment_date('d.m.Y') are not working. Any ideas?

  2. sepp88
    Member
    Posted 14 years ago #

    SOLUTION found:

    comment_date, DATE_FORMAT(comment_date, '%d.%m.%Y %H:%i:%s') AS comment_date_ger, comment_date_gmt...

About this Topic