+ Reply to Thread
Results 1 to 4 of 4

extract date from string

  1. #1
    Registered User
    Join Date
    12-13-2005
    Posts
    19

    extract date from string

    i know this is probably a really simple thing to do but i am really not familiar with text worksheet functions. anyways i have a cell which contains the string: "Transfer Date: 3/19/2006". i want to extract only the date from the string e.g. "3/19/2006".

    note: if it was March 1st, then it would show "Transfer Date: 3/1/2006"...so i cant use the right function since i dont know the exact length of the date.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Try this:

    For A1 containing text in the format you described
    A1: Transfer Date: 3/19/2006

    B1: =--TRIM(MID(A1,FIND(":",A1)+1,255))
    Format B1 as a date.

    Does that help?

    Regards,
    Ron

  3. #3
    Beege
    Guest

    Re: extract date from string

    kdp

    Select cells, Data/Text to Columns/Fixed Length.
    Separate words and space from date, format as date
    You can choose to not import the text part.

    HTH
    Beege


    "kdp145" <[email protected]> wrote in
    message news:[email protected]...
    >
    > i know this is probably a really simple thing to do but i am really not
    > familiar with text worksheet functions. anyways i have a cell which
    > contains the string: "Transfer Date: 3/19/2006". i want to extract only
    > the date from the string e.g. "3/19/2006".
    >
    > note: if it was March 1st, then it would show "Transfer Date:
    > 3/1/2006"...so i cant use the right function since i dont know the
    > exact length of the date.
    >
    >
    > --
    > kdp145
    > ------------------------------------------------------------------------
    > kdp145's Profile:
    > http://www.excelforum.com/member.php...o&userid=29594
    > View this thread: http://www.excelforum.com/showthread...hreadid=518715
    >




  4. #4
    Registered User
    Join Date
    12-13-2005
    Posts
    19

    problem solved

    thnx Ron..that worked perfectly

+ 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