+ Reply to Thread
Results 1 to 6 of 6

RFC 2822 Date format not supported?

  1. #1
    Registered User
    Join Date
    08-01-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    76

    RFC 2822 Date format not supported?

    I tried passing a value in RFC 2822 format to the DateTime and CDate functions respectively and on each occasion I get a "type mismatch" error. I subsequently re-formatted each of the values in "YYYY/MM/DD HH:MM:SS" format (which is an ugly hack) and they were succesfully cast to Date data types.

    Now ... am I missing something really obvious here, or does Excel VBA really not support RFC 2822 Date format, which has been around in one form or another since 1980-something and is used by damn near everything on the internet???!!

    I don't believe that, there must be a built-in that can cast an RFC 2822 date string to a Date data type.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: RFC 2822 Date format not supported?

    I have no idea what an RFC 2822 date format is, but a quick google search did not turn up much (meaning that it is probably not suppoprted). However, this link may be of use?

    http://www.java2s.com/Code/Android/D...dUTCformat.htm
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-01-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: RFC 2822 Date format not supported?

    Yep, that's pretty much what I've done in VBA. I guess there is no built-in for it.

    for information, RFC2822 is defined here: http://tools.ietf.org/html/rfc2822 AFAIK, it used to be used exclusively for email communication, but now it is used by a lot more than that.
    Last edited by XmisterIS; 06-17-2014 at 11:23 AM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: RFC 2822 Date format not supported?

    Thanks for the link, sorry I could not help more

  5. #5
    Registered User
    Join Date
    08-01-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: RFC 2822 Date format not supported?

    No probs

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: RFC 2822 Date format not supported?

    Formula?

    A
    B
    C
    1
    Fri, 09 Sep 2005 13:51:39 -0700
    09 Sep 2005 20:51:39
    B1: =MID(A1, 6, 20) - DOLLARDE(RIGHT(A1, 5)/100, 60) / 24
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Date Format Of User PC Changes Display format date of Excel File after update
    By waihar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2014, 03:09 AM
  2. Replies: 5
    Last Post: 02-08-2013, 11:06 AM
  3. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  4. Item not Collected: Format not supported bt office Clipboard
    By paujoh-8 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-17-2011, 12:09 PM
  5. [SOLVED] date type format which is supported by excel 2003
    By kanchan in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-21-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1