+ Reply to Thread
Results 1 to 7 of 7

Date Formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Date Formatting

    Hello and thanks in advance for any help on this.

    I have an excel file that has come over from another source. Currently the date columns show for ex:

    1312011 for 1/31/2011
    10012012 for 10/01/2012
    1232012 for 1/23/2012

    I need the date to be formatted so that they all show up with the slashes in the order above. Seems like a simple format equation but when i go in to format the sells I just get ################## and nothting will format. I was doing some ready an it might have to do with something like the data source is coming from a Mac, but not sure. Is there anyway to get these cells formatted with the slashes in?

    Thanks

  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
    53,048

    Re: Date Formatting

    Hi and welcome to the forum

    The way you have downloaded your data makes it almost impossible to convert to dates. For instance, if you take your last sample...
    1232012...that could be
    1/23/2012
    or
    12/3/2012
    How would you know the difference? Is there any other way that you could pull that data in that could make the dates 01232012 - ie 8 digits?
    Last edited by FDibbins; 02-11-2013 at 04:56 PM.
    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
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date Formatting

    this always gets awkward with different default date systems but
    =VALUE(LEFT(TEXT(A1,"00000000"),2)&"/"&MID(TEXT(A1,"00000000"),3,2)&"/"&RIGHT(A1,4)) formate cell as date
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  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
    53,048

    Re: Date Formatting

    Martin, would that handle 4, 6, 7 or 8 number dates?

    ie
    1112 (1/1/2012)
    112012 (1/1/2012)
    1112012 (11/1/2012 - or 1/11/2012)
    10012012 (10/01/2012)

    Just curious

  5. #5
    Registered User
    Join Date
    02-11-2013
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Date Formatting

    Marin that worked out perfectly for me thanks for your help. What I did before was did some left pulling and kind or rigged it so I could sort by the dates I needed. Thanks again and thanks everyone for your responses. Do you guys know if this is a common error with dates and Mac systems. I ran into a problem before with the 1904 date system that was sent to us from the same company.

    Thanks
    Scott

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Date Formatting

    fd i assumed only the leading 0 got dropped

  7. #7
    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
    53,048

    Re: Date Formatting

    OK thanks, so 6,7 or 8 digits dates

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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