By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

ISO to RFC822

P: n/a
Hi,

I've been carefully storing my dates as ISO dates in a DB and now have to
add an RSS feed to a website. Is there an easy way to convert these dates to
RFC822 compliant dates ? I've had a look for a component of some sort but
had no luck.Any Pointers ?

Thanks

J
Jul 26 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Are the dates being stored in the database in character columns? They should
be stored as date-time columns.

If they are date-time then you just need to format them to RFC822 format
when you output them. If you can give a link to the format (or list it here)
then someone can probably show you some formatting code.

--
--Mark Schupp
"John Smith" <jo**@smith.com> wrote in message
news:j8********************@pipex.net...
Hi,

I've been carefully storing my dates as ISO dates in a DB and now have to
add an RSS feed to a website. Is there an easy way to convert these dates
to RFC822 compliant dates ? I've had a look for a component of some sort
but had no luck.Any Pointers ?

Thanks

J

Jul 26 '05 #2

P: n/a
"John Smith" <jo**@smith.com> wrote in message
news:j8********************@pipex.net...
Hi,

I've been carefully storing my dates as ISO dates in a DB and now have to
add an RSS feed to a website. Is there an easy way to convert these dates
to RFC822 compliant dates ? I've had a look for a component of some sort
but had no luck.Any Pointers ?

Thanks

J
"Mark Schupp" <no******@email.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl.. .

Are the dates being stored in the database in character columns? They
should be stored as date-time columns.

If they are date-time then you just need to format them to RFC822 format
when you output them. If you can give a link to the format (or list it
here) then someone can probably show you some formatting code.

--
--Mark Schupp


Hi Mark,

These are stored as ISO dates (e.g. 20050726 for today) without
the time format (I was going to dispense with this!).

The RFC-822 compliant equivalent would be Tue, 26 Jul 2005.

The other option is just starting fresh and storing RFC compliant details
in a new column !

Thanks

J
Jul 27 '05 #3

P: n/a
VBScript and T-SQL are both capable of outputting . I'm not sure this
specific style is covered, but these should get you started:

http://www.aspfaq.com/2313
http://www.aspfaq.com/2460
http://www.aspfaq.com/2464

FWIW, I think it is more the job of ASP to provide the presentation format,
unless you are converting completely to something like FOR XML right out of
the database and skipping the ASP logic side of things.

And I will have to agree with Mark. These are datetime values, store them
as datetime, THEY ARE NOT STRINGS!

"John Smith" <jo**@smith.com> wrote in message
news:j8********************@pipex.net...
Hi,

I've been carefully storing my dates as ISO dates in a DB and now have to
add an RSS feed to a website. Is there an easy way to convert these dates
to RFC822 compliant dates ? I've had a look for a component of some sort
but had no luck.Any Pointers ?

Thanks

J

Jul 27 '05 #4

P: n/a
Thanks for that Aaron, I'll take a look at the samples.

I'll defend myself slightly and say that originally RSS wasn't in the
picture so
I stored the dates accordingly as they are mainly used for
searches, 'last updated' and a few other things !

Alas we are all at the mercy of client whims...............

Thanks

J

"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
VBScript and T-SQL are both capable of outputting . I'm not sure this
specific style is covered, but these should get you started:

http://www.aspfaq.com/2313
http://www.aspfaq.com/2460
http://www.aspfaq.com/2464

FWIW, I think it is more the job of ASP to provide the presentation
format, unless you are converting completely to something like FOR XML
right out of the database and skipping the ASP logic side of things.

And I will have to agree with Mark. These are datetime values, store them
as datetime, THEY ARE NOT STRINGS!

"John Smith" <jo**@smith.com> wrote in message
news:j8********************@pipex.net...
Hi,

I've been carefully storing my dates as ISO dates in a DB and now have to
add an RSS feed to a website. Is there an easy way to convert these dates
to RFC822 compliant dates ? I've had a look for a component of some sort
but had no luck.Any Pointers ?

Thanks

J


Jul 27 '05 #5

P: n/a
> I stored the dates accordingly as they are mainly used for
searches, 'last updated' and a few other things !


That still doesn't help justify CHAR/VARCHAR as a better choice. In fact,
it adds to the argument FOR a proper data type.
Jul 27 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.