Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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


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.

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


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 this formula:

=MID(A2,MIN(IFERROR(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(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A2,1),LEN(A2)+1))) into a blank cell where you want to get the result, and then press Ctrl + Shift + Enter keys together, and only the date is extracted as following screenshot shown:

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:

1. In the above formula, A2 is the cell which contains the date you want to extract;

2. If the cell contains other numbers, this formula will not work correctly;

3. The formula cannot correctly extract date while there is more than one date in the text string.


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.
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.
    Anett · 7 months 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 · 10 months 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.
    Tak · 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.
      Tak · 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.
        Tak · 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.
          sree · 1 months ago
          Hi Tak,
          Its working perfectly. But why "17" at the end? kindly assist.
          • To post as a guest, your comment is unpublished.
            Tak · 1 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.
    chathuka perera · 1 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