+ Reply to Thread
Results 1 to 6 of 6

Extract date from text

  1. #1
    Registered User
    Join Date
    08-02-2019
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    14

    Extract date from text

    Hello,

    I have data like

    To_delivery_23-08_2019-2
    To_quality_24-08-2019-2
    Production_on_22-08-2019-5

    I want extract DD-MM-YYYY from above text, before date the text length may vary and after date count also vary all the time.

    Help me regarding this.
    Thanks,
    Prashanth.

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,420

    Re: Extract date from text

    Your dates seem to show that either a dash or underline can appear between the day and month as wall as the month and year... is that correct? If so, will there ever be any non-date numbers located before or after the date you are after next which have either a dash or underline character next to them? Also, is the day number always two digits long (leading zero for single digit day numbers).
    Last edited by Rick Rothstein; 08-27-2019 at 05:11 PM.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: Extract date from text

    Assuming it's always in dd-mm-yyyy format found in string...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Format as DD-MM-YYYY.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    08-02-2019
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    14
    Quote Originally Posted by Rick Rothstein View Post
    Your dates seem to show that either a dash or underline can appear between the day and month as wall as the month and year... is that correct? If so, will there ever be any non-date numbers located before or after the date you are after next which have either a dash or underline character next to them? Also, is the day number always two digits long (leading zero for single digit day numbers).
    In between date, months year always dash(-) and date always like 01, 02, 03 and months like as date

    Thanks

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,420

    Re: Extract date from text

    Quote Originally Posted by Prashanth.Akula View Post
    In between date, months year always dash(-) and date always like 01, 02, 03 and months like as date
    Assuming there is never any dashes located before the date in your text, I think this should work (I cannot test it because my date order is different from yours)...

    =0+LEFT(REPLACE(A1,1,FIND("-",A1)-3,""),10)

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,415

    Re: Extract date from text

    Another ...

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Extract Date from text
    By JGREEN17 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2018, 12:37 PM
  2. [SOLVED] extract date from text
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-26-2017, 03:17 PM
  3. [SOLVED] Extract Date from text
    By hkbhansali in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-18-2016, 11:58 AM
  4. Extract time and date from Text
    By zxchan in forum Excel General
    Replies: 8
    Last Post: 06-30-2014, 11:16 PM
  5. extract text from date
    By interested in forum Excel General
    Replies: 24
    Last Post: 02-21-2012, 09:05 AM
  6. [SOLVED] Extract Date (04/05/06) into Text (040506)
    By Who I Am in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2006, 02:45 AM
  7. EXTRACT TEXT FROM A DATE
    By Ronbo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-01-2005, 04:06 AM

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