Generate Date-Time for Podcast, Vodcast, or RSS Feed from MSOffice

    June 13, 2006

The RSS date/time format is a pain to create if you are building the XML for your RSS feed in a text editor.

To make things simple, I created a single line of VBA code that would generate a properly formatted RFC 822 date string that can be used in your RSS feed file.

To generate a string for the current date-time, follow these steps:

1. Open any Microsoft Office application.

2. Open the Microsoft Visual Basic development editor (in Word, it is available through the Tools > Macro > Visual Basic Editor menu).

3. You should see the Immediate window at the bottom of the screen. If not, select the View > Immediate Window menu option.

4. Enter the following code into the window (all on a single line) and press the Enter key:

? format(Now(),"ddd, dd mmm yyyy hh:mm:ss") & " GMT"

5. You should see the properly formatted date and time for the present moment appear on the line below. Simply copy the text and paste it into your RSS feed file!

6. If you want to format a particular date/time, you can use code such as:

? format("12/25/06 11:59:59","ddd, dd mmm yyyy hh:mm:ss") & " GMT"

In the XML file for your RSS Feed, Podcast, or Vodcast, you can add a publication date to an item like this (see <pubDate> line):

<title>Interview with screenwriter Jack Sekowski</title>
<description>Interview with screenwriter Jack Sekowski that also includes free download of a produced script "Who's Your Daddy?" </description>
<strong><pubDate>Thu, 01 Jun 2006 09:27:21 GMT</pubDate> </strong>

Add to | DiggThis | Yahoo! My Web | Furl

Dan Rahmel has made significant contributions including authoring over a dozen books (e.g. Nuts and Bolts Filmmaking from Focal Press), working as an Art Director and an Electrician in Hollywood feature films and television. He is the founder and webmaster of Visit today for Free scripts, Free templates (script, storyboard, etc.), film glossary, and general know-how.