+ Reply to Thread
Results 1 to 7 of 7

extract date from text

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    extract date from text

    Hello all
    i need to extract date from this value (21703301B) to become 30-03-2017
    i found this formula but it extract 21703301
    HTML Code: 
    ALT+CTRL+Enter
    will appreciate all help
    regards

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract date from text

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

    I wasn't sure if there will be parentheses if yes, use this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 12-26-2017 at 01:37 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: extract date from text

    Dear ALkey
    many thanks its work good
    please can modify in the following formula
    HTML Code: 
    that from Date give text as thw foloowing
    27-12-2017 to give me 21712271C

  4. #4
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: extract date from text

    Quote Originally Posted by AlKey View Post
    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I wasn't sure if there will be parentheses if yes, use this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    please see my attahced file that
    the last formual give me correct result with year 2017 and year 2016 it give me 2006 why ?
    i marked it with yellow
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extract date from text

    Try
    Enter in F2 and copy down
    Format m/d/yyyy
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F
    1 04/08/2016 201608041B 14,523 14,251 8/4/2016
    2 07/08/2017 21708071B 17,335 17,310 21708071 8/7/2017
    Last edited by AlKey; 12-26-2017 at 02:25 PM.

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: extract date from text

    it work good many thanks for your effort
    what about this
    27-12-2017 to give me 21712271C
    =IF(ISBLANK(G2),"",TEXT(G2,"yyyymmdd")&"1C")

  7. #7
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: extract date from text

    Hi to all!

    Like your examples...

    1. If you have like 21703301B or 201703301B, and you want to extract date, you can use:
    =--TEXT(LEFT(IF(LEN(B1)=9,REPLACE(B1,2,,0),B1),8),"0000-00-00")

    Later put the format that you want.

    2. If you have a date, like 27-12-2017, you can use
    =REPLACE(TEXT(F1,"yyyymmdd"),2,1,)&"1C"

    Blessings!

+ 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 hkbhansali in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-18-2016, 11:58 AM
  2. extract a date from a text string
    By theobrandt in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-02-2016, 08:30 AM
  3. [SOLVED] Extract text from cell which includes a date?
    By hilton426 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-02-2016, 08:44 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