Mysql Query = Convert Unix Timestamp to RFC 822 Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mysql Query = Convert Unix Timestamp to RFC 822 Date

    Hi,
    I'm trying to create a RSS feed and have yet to convert the timestamp into a RFC 822 date. From what I've read there is a mysql function that will convert during the retrieval. Maybe "FROM UNIXTIME" or "DATE FORMAT". Just not sure how to create a query string and put it all together. Here's my query so far.

    Code:
    $SQLQuery = "Select title, body, entry_id, postdate FROM my_blogs ORDER BY postdate DESC";
    In my application I can't "echo" so it needs to do it while retrieving the data, if possible.
    Anybody help will be appreciated.
    Thanks

    #2
    PHP Code:
    $SQLQuery "Select title, body, entry_id, postdate FROM my_blogs ORDER BY postdate DESC";
    $lists mysql_query($SQLQuery);
        while(
    $list=mysql_fetch_array($lists))
        {
               
    $date date(DATE_RFC822,$list[3]);
        } 

    Comment

    Working...
    X