+ Reply to Thread
Results 1 to 7 of 7

Convert date text to Excel date

  1. #1
    Forum Contributor
    Join Date
    09-05-2009
    Location
    Cologne, Germany
    MS-Off Ver
    Excel 2010
    Posts
    156

    Question Convert date text to Excel date

    I have a list of dates in my spreadsheet that were copied (from an html file) and pasted into it. Therefore,this information is text. I would have thought it simple enough to convert this to excel date format (ie. numeric) that I can then manipulate as much as my heart desires! But no. I've tried, searched and cannot find a solution and I have a suspicion (hope) that someone here will tell me that it's quite simple? The date text as an example is: "Saturday 18 August" (without the quotes of course). I tried adding '2012' to these dates and then attempted to convert and that didn't work either.
    Last edited by kborgers; 06-19-2012 at 03:33 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Convert date text to Excel date

    Put the 12 months of the year in a range somewhere else, and name it Months.
    Then, if the date's in A2, B2 can be
    =DATE(2012,MATCH(RIGHT(A2,LEN(A2)-FIND(" ",A2,FIND(" ",A2)+1)),Months,0),MID(A2,FIND(" ",A2)+1,2))

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Convert date text to Excel date

    Hi could You upload sample file (excel file)?
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Convert date text to Excel date

    To explain, this builds the date from year (2012), month (match the month name in the range of months to give its month number - the name is extracted by taking the end of text string after the second space), day (take the middle of the text string, the 2 characters after the first space)

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Convert date text to Excel date

    Hi Kborgers,

    If you have the date in cell A1, you can use below formula:-

    =RIGHT(A1,LEN(A1)-SEARCH(" ",A1))*1

    and then convert the format of the cell as Date


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  6. #6
    Forum Contributor
    Join Date
    09-05-2009
    Location
    Cologne, Germany
    MS-Off Ver
    Excel 2010
    Posts
    156

    Re: Convert date text to Excel date

    I thought I already posted a reply to you all but I cannot see it so I'll try again! Thanks to all for quick response. I went with Dilip's solution as it worked beautifully and was (embarassingly) simple Thanks again all.

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Convert date text to Excel date

    You are welcome Kborgers..

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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