+ Reply to Thread
Results 1 to 5 of 5

Convert date as text to actual date

Hybrid View

  1. #1
    Registered User
    Join Date
    01-22-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Convert date as text to actual date

    I've been sent a spreadsheet in which one column represents dates, but they have been entered as plain text, MM/DD/YYYY (ie 12/31/2008).

    I ultimately need to import this as a CSV into a program that only understands dates in the format DD/MM/YYYY.

    I'd ideally like excel to recognise this field as containing dates, but I can't figure out how to do that, or even how to swap the days and months around as text. I'm using 2007.

    Any help appreciated
    Last edited by andysurtees; 01-26-2009 at 07:55 PM.

  2. #2
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    This may or may not work, if it doesn't let us know & someone can provide a formulaic solution...

    On a copy of your spreadsheet, try selecting the column, Data - Text to Columns - Delimited - next - next - choose Date in the "column data format" section & adjust the dropdown as required -Finish.

    Edit: this is a suggestion for Excel 2003, the concept should work in 2007 too but I don't know where you would find it - I'll post a formula soon.

    hth
    Rob
    Last edited by broro183; 01-23-2009 at 01:37 AM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    This formula may do the trick.
     =DATE(RIGHT(A1,4),LEFT(A1,2),MID(A1,4,2))
    hth
    Rob

  4. #4
    Registered User
    Join Date
    01-22-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    11
    Thanks. The first answer allowed me to sort out a decent enough workaround that'll be fine for my purposes. The second answer it more elegant, but returns a result with the correct day and month, but the year as 1900, for a reason that it's beyond my capacity to determine at this time on a friday afternoon..

    I'll be able to get the job done using a version of your first suggestion though so many thanks for that.

  5. #5
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hmmm, interesting...
    Ahhh, I may have it!
    If there are "hidden" or "junk" characters at the right of the cell value you may find this works...
    =DATE(MID(A1,7,4),LEFT(A1,2),MID(A1,4,2))
    Anyway, since you are happy with the first version can you please mark the post as solved?

    Thanks
    Rob

+ 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