Advertising  |  About Us  |  Contact Us  |  RSS

Generate Date-Time for Podcast, Vodcast, or RSS feeds

By Dan Rahmel  |  03-Jul-2006

Whether you are publishing a RSS feed, a Podcast, or a Vodcast, the RSS date/time format is a pain in the neck to create -- especially if you are building the XML in a text editor. To make things quick and simple, I created a single line of VBA (Visual Basic for Applications) code that generates a properly formatted RFC #822 date/time string that you can use in your RSS feed file.

Since the VBA environment is built into all of the Microsoft Office applications (and Outlook as well), getting the date/time is a snap. To have VBA generate a string with the current date-time, follow these steps:

1. Open any Microsoft Office application.

2. Open the Microsoft Visual Basic development editor. Try hitting the shortcut key (Alt-F11) which will open the editor in most Office applications. You can also reach the editor through the menu system. In Microsoft Word, use the Tools > Macro > Visual Basic Editor menu.

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

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

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

Note: I have used PST (for Pacific Standard Time) since I live on the west coast of the United States. You can substitute UT for universal time or GMT for Greenwich Mean Time. Alternately, you can use time standard initials for eastern (EST or EDT), central (CST or CDT), or mountain (MST or MDT) time. Check the RFC #822 for even more specific designations.

5. Copy the generated code for pasting into your RSS file. You should see the properly formatted date and time on the line below the entered code. Simply copy the text and paste it where you need it!

The code statement above will generate correct formating for the current time. If you want to format a specific date/time, you can use code such as:

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

In the RSS XML feed file, you can add a publication date to each item like this (see line):

Interview with screenwriter Jack Sekowski
Interview with screenwriter Jack Sekowski with a free download of his produced script "Who's Your Daddy?"
Thu, 01 Jun 2006 09:27:21 GMT

This small line of date generation code should save you some hand wringing. It also prevents accidental mistakes in the date/time that could make your RSS invalid. For complete date formatting information, check out the complete RFC #822 spec (

Dan Rahmel has authored over a dozen books (the popular "Nuts and Bolts Filmmaking" from Focal Press is a recent example), worked as an Art Director and an Electrician in Hollywood feature films and television, and runs the celebrated web site ( for guerilla filmmaking info, free scripts, templates, and general know-how.

< Back to Latest Posts



More Posts

Blog Archive >