<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get MySQL date in RFC-822 format for RSS feeds</title>
	<atom:link href="http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Thu, 09 Feb 2012 21:01:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-53367</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 18 Jan 2012 17:03:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-53367</guid>
		<description>Just wanted to mention that you can simply include the timezone offset in the format string, assuming it is relatively static. So for example:

DATE_FORMAT(date, &#039;%a, %d %b %Y %T -0600&#039;)

The -0600 portion does not contain any special or escaped characters, so it just displays as written. Depending on your application environment, there are a number of ways to dynamically produce this format string prior to building the select statement.</description>
		<content:encoded><![CDATA[<p>Just wanted to mention that you can simply include the timezone offset in the format string, assuming it is relatively static. So for example:</p>
<p>DATE_FORMAT(date, &#8216;%a, %d %b %Y %T -0600&#8242;)</p>
<p>The -0600 portion does not contain any special or escaped characters, so it just displays as written. Depending on your application environment, there are a number of ways to dynamically produce this format string prior to building the select statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-33000</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 13 Jun 2011 15:44:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-33000</guid>
		<description>How do you take a column that has dates stored as RFC-822 and pull it out as YYYYMMDD or of the like? That so far seems impossible.</description>
		<content:encoded><![CDATA[<p>How do you take a column that has dates stored as RFC-822 and pull it out as YYYYMMDD or of the like? That so far seems impossible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-37635</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Fri, 19 Feb 2010 11:21:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-37635</guid>
		<description>Thanks, i&#039;ve searched for that all day long!</description>
		<content:encoded><![CDATA[<p>Thanks, i&#8217;ve searched for that all day long!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcello Orizi</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-32745</link>
		<dc:creator>Marcello Orizi</dc:creator>
		<pubDate>Fri, 21 Aug 2009 12:07:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-32745</guid>
		<description>Hi all,
 to add the correct timezone formatted in RFC-822 format in Java I found this method. I don&#039;t like it too much because it requires to call cal.getTime() everytime but it seems to do what needed.

import java.util.Calendar;
import java.text.SimpleDateFormat;

public class foo{
    public static final String DATE_FORMAT_RFC822_TIMEZONE = &quot;Z&quot;;
    
    public String getRFC822TimeZone() {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat sdf = new    SimpleDateFormat(DATE_FORMAT_RFC822_TIMEZONE);
        return sdf.format(cal.getTime()); 
    }
    
}</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
 to add the correct timezone formatted in RFC-822 format in Java I found this method. I don&#8217;t like it too much because it requires to call cal.getTime() everytime but it seems to do what needed.</p>
<p>import java.util.Calendar;<br />
import java.text.SimpleDateFormat;</p>
<p>public class foo{<br />
    public static final String DATE_FORMAT_RFC822_TIMEZONE = &#8220;Z&#8221;;</p>
<p>    public String getRFC822TimeZone() {<br />
        Calendar cal = Calendar.getInstance();<br />
        SimpleDateFormat sdf = new    SimpleDateFormat(DATE_FORMAT_RFC822_TIMEZONE);<br />
        return sdf.format(cal.getTime());<br />
    }</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jannick Bolten</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-32241</link>
		<dc:creator>Jannick Bolten</dc:creator>
		<pubDate>Mon, 27 Jul 2009 06:33:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-32241</guid>
		<description>Thank you! I&#039;m using it :-)</description>
		<content:encoded><![CDATA[<p>Thank you! I&#8217;m using it :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damian</title>
		<link>http://www.tech-recipes.com/rx/1461/get-mysql-date-in-rfc-822-format-for-rss-feeds/comment-page-1/#comment-30786</link>
		<dc:creator>Damian</dc:creator>
		<pubDate>Thu, 04 Jun 2009 07:40:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-30786</guid>
		<description>Found this very helpful.  The only one thing I would say is that if you try and use ORDERBY rfcpubate DESC in the MYSQL query something weird happens and it doesn&#039;t select the most recent.  To fix i did this:

SELECT pubdate, DATE_FORMAT(pubdate,&#039;%a, %d %b %Y %T&#039;) AS rfcpubdate FROM tablename ORDERBY pubdate DESC

very helpful indeed though</description>
		<content:encoded><![CDATA[<p>Found this very helpful.  The only one thing I would say is that if you try and use ORDERBY rfcpubate DESC in the MYSQL query something weird happens and it doesn&#8217;t select the most recent.  To fix i did this:</p>
<p>SELECT pubdate, DATE_FORMAT(pubdate,&#8217;%a, %d %b %Y %T&#8217;) AS rfcpubdate FROM tablename ORDERBY pubdate DESC</p>
<p>very helpful indeed though</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (User agent is rejected)
Database Caching 3/11 queries in 0.651 seconds using memcached
Object Caching 347/347 objects using memcached

Served from: www.tech-recipes.com @ 2012-02-10 05:45:18 -->
