Monday, November 23, 2009

How to Convert a date from SQL to RFC822 Format

This was quite an annoying issue when trying to manually create a RSS feed from SQL / ASP.

Finally worked out the Statement needed (if your DateTime row name is datetime):



or full example statement:



So just chuck that in your SQL statement, and your good to go.

It will format the date as follows:
Wed, 02 Oct 2009 08:00:00 GMT

Also another handy link i found was here, validates your feed. Very helpful:
feedvalidator.org

No comments:

Post a Comment