How to extract date from text strings in Excel?

In Excel worksheet, how could you extract the date from text strings as following screenshot shown? This article, I will talk about a useful formula to solve it.

Extract date from text strings with array formula in worksheet


Extract date from text strings with array formula in worksheet

To extract only date from a list of text strings, the following array formula can help you, please do as this:

1. Enter the below formula into a blank cell where you want to get the result, and then press Enter keys together, and only the date is extracted as following screenshot shown:

=MID(A2,MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)),LOOKUP(1,0*MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),ROW(INDIRECT("1:"&LEN(A2)))) + 1 - MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)))

2. Then select the formula cell, and drag the fill handle down to the cells you want to apply this formula, and you will get the results as you need, see screenshot:

  • Notes:
  • In the above formula, A2 is the cell which contains the date you want to extract;
  • If the cell contains other numbers, this formula will not work correctly;
  • The formula cannot correctly extract date while there is more than one date in the text string.

Convert various non-standard dates to normal real date in Excel

With the Convert to Date utility of Kutools for Excel, you can quickly convert various non-standard dates to normal real dates at the same time in Excel. Click to download Kutools for Excel!

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Josh · 4 months ago
    I'm aware that the formula wont work if there are other numbers in the cell, however, is there a way to only extract numbers that are in date format?
    Example: People 5/ 2/12/20
    Ignore the 5 and only output the 2/12/2020

    Thank you
  • To post as a guest, your comment is unpublished.
    Adam Tabor · 7 months ago
    This was working perfectly up until 01/01/2020 - Anyone know how to fix this?
    • To post as a guest, your comment is unpublished.
      skyyang · 7 months ago
      Hello, Adam,
      The formula has been fixed as below:
      =MID(A2,MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)),LOOKUP(1,0*MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),ROW(INDIRECT("1:"&LEN(A2)))) + 1 - MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)))

      Please try, hope it can help you!
      • To post as a guest, your comment is unpublished.
        Adam Tabor · 6 months ago
        skyyang - Sorry I've moved away onto something else. This works perfectly - Thank you so much!
      • To post as a guest, your comment is unpublished.
        Neil · 6 months ago
        I'm experiencing a problem with this formula not displaying the entire date value.
        Similar to Adam Tabor, the formula was displaying the date value as expected up until 01/01/2020. Since then, the date value is missing the last digit

        Example:
        Cell A1 contains the string "Monthly-Returned-Ticket-Report-01-29-2020"

        Cell A2 contains the following formula:
        =MID(A1,MIN(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1,1),LEN(A1)+1)),LOOKUP(1,0/MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),ROW(INDIRECT("1:"&LEN(A1)))) + 1 - MIN(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A1,1),LEN(A1)+1)))

        Expected Result: Cell A2 displays the value "01-29-2020"

        Actual Result: Cell A2 displays the value "01-29-202"

        Hoping someone has an idea about what needs to be tweaked to deal with this new behavior since the new year?
        • To post as a guest, your comment is unpublished.
          skyyang · 5 months ago
          Hello, Neil,
          The formula in this article has been updated, please apply the below formula:
          =MID(A2,MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)),LOOKUP(1,0*MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),ROW(INDIRECT("1:"&LEN(A2)))) + 1 - MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789",1)),LEN(A2)+1)))

          Please try, hope it can help you!
          • To post as a guest, your comment is unpublished.
            Neil · 5 months ago
            This updated formula worked for my use case when I changed my source cell to A2. Thanks for the update Skkyang! :)
      • To post as a guest, your comment is unpublished.
        Joy · 6 months ago
        Hello, I tried it with a string and it doesn't work
        • To post as a guest, your comment is unpublished.
          Adam Tabor · 6 months ago
          skyyang - Sorry I've moved away onto something else. This works perfectly - Thank you so much!
  • To post as a guest, your comment is unpublished.
    Anett · 1 years ago
    Hi, Help me please! How about if my text is "Date and time of submission:23-Jun-2017 12:34:58 AM PDT. What kind of formula can i use ?
  • To post as a guest, your comment is unpublished.
    Nancy · 1 years ago
    how about if my text is "Date and time of submission: September 16, 2018 at 11:26:00 PM PDT"? What kind of formula can i use ?
  • To post as a guest, your comment is unpublished.
    zgap1122 · 1 years ago
    I'm using Excel 2003, so I believe the IFERROR does not exist, and I found this quoted on the web to be the equivalent:

    IFERROR(A1,"") = IF(ISERROR(A1),"")

    So I'm trying this:

    =MID(A2,MIN(IF(ISERROR(FIND({0,1,2,3,4,5,6,7,8,9},A2,1)),LEN(A2)+1)),LOOKUP(1,0/MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),ROW(INDIRECT("1:"&LEN(A2)))) + 1 - MIN(IF(ISERROR(FIND({0,1,2,3,4,5,6,7,8,9},A2,1)),LEN(A2)+1)))

    - I did press CTRL+SHIFT+ENTER the actual forumla in excel shows it in {}

    Using this formula, I just get a blank result

    Can check and let me know where I’ve gone wrong... Or is it not possible in Excel 2003

    Thank you
    • To post as a guest, your comment is unpublished.
      zgap1122 · 1 years ago
      Actually my data to extract is in the format:

      Data valid for 14 December 2018

      So I need to extract the "14 December 2018" and not the usual
      xx/xx/xx
      • To post as a guest, your comment is unpublished.
        zgap1122 · 1 years ago
        This seemsto for work me(Excel 2003)

        =DATEVALUE(MID(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),17))

        : A2 contains the data to extract

        : it finds the first numerical value, then translates restas date

        Works for data in this format : Data valid for 14 December 2018
        • To post as a guest, your comment is unpublished.
          SGP · 9 months ago
          Hi Tak,
          Its working perfectly. But why "17" at the end? kindly assist.
          • To post as a guest, your comment is unpublished.
            zgap1122 · 9 months ago
            Looking at the "mid" function" it's = number of characters...

            So the longest it will be = "dd september yyyy" = 17 characters

            2 = date
            9 = month
            4 = year
            2 = spaces

            Maybe I should have said the data is : "25 September 2018"

            So 17 should cover for all the months of the year :)
  • To post as a guest, your comment is unpublished.
    SHWETA · 1 years ago
    PLEASE HELP ME EXTRACT DATE FROM THE STATEMENTS LIKE "PLEASE DELIVER BY Fri,01 January ,2016"
  • To post as a guest, your comment is unpublished.
    chathukaperera@gmail.com · 2 years ago
    Can someone help me find a string to extract the date in this format please yyyy-mm-dd
    "2018-03-24T01:42:26-07:00"



    Thanks much in advance