ISO to RFC822

Discussion in 'ASP General' started by John Smith, Jul 26, 2005.

  1. John Smith

    John Smith Guest

    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
    John Smith, Jul 26, 2005
    #1
    1. Advertising

  2. John Smith

    Mark Schupp Guest

    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" <> wrote in message
    news:...
    > 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, Jul 27, 2005
    #2
    1. Advertising

  3. John Smith

    John Smith Guest


    > "John Smith" <> wrote in message
    > news:...
    >> 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" <> wrote in message
    >>news:%...

    > 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
    John Smith, Jul 27, 2005
    #3
  4. 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" <> wrote in message
    news:...
    > 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
    >
    Aaron Bertrand [SQL Server MVP], Jul 27, 2005
    #4
  5. John Smith

    John Smith Guest

    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]" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> 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
    >>

    >
    >
    John Smith, Jul 27, 2005
    #5
  6. > 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.
    Aaron Bertrand [SQL Server MVP], Jul 27, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Franck DARRAS
    Replies:
    12
    Views:
    634
    Jim Higson
    Aug 23, 2004
  2. Alexei Polkhanov
    Replies:
    11
    Views:
    2,459
  3. Replies:
    13
    Views:
    6,420
    Dave Thompson
    Dec 20, 2004
  4. ISO C89 and ISO C99

    , Dec 10, 2004, in forum: C Programming
    Replies:
    18
    Views:
    544
    Dave Thompson
    Dec 20, 2004
  5. James Mills

    GSM to ISO / UCS2 to ISO

    James Mills, Aug 16, 2010, in forum: Python
    Replies:
    0
    Views:
    481
    James Mills
    Aug 16, 2010
Loading...

Share This Page