+ Reply to Thread
Results 1 to 5 of 5

How do I grab the date from a text string?

  1. #1

    How do I grab the date from a text string?

    Hi,

    How would I grab the date out of a string where the date text is
    located at the end of the string? The string is of variable length. IE

    "I need your help 2 jun 2006"
    "I have no idea what I'm doing 2 jun 2006"

    I'll need to convert the date string into a integer date value.
    Thanks for your help


  2. #2
    Bondi
    Guest

    Re: How do I grab the date from a text string?


    Hi,

    Maybe you can use something along the line of: (String in A4)

    =DATEVALUE(RIGHT((A4),11))

    Regards,
    Bondi


  3. #3
    Aladin Akyurek
    Guest

    Re: How do I grab the date from a text string?

    If there is never any digit in the string before the date substring at
    the end:

    =REPLACE(A2,1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1,"")+0

    [email protected] wrote:
    > Hi,
    >
    > How would I grab the date out of a string where the date text is
    > located at the end of the string? The string is of variable length. IE
    >
    > "I need your help 2 jun 2006"
    > "I have no idea what I'm doing 2 jun 2006"
    >
    > I'll need to convert the date string into a integer date value.
    > Thanks for your help
    >


  4. #4
    Biff
    Guest

    Re: How do I grab the date from a text string?

    Hi!

    > "I need your help 2 jun 2006"
    > "I have no idea what I'm doing 2 jun 2006"


    Are the quotes part of the string?

    If not:

    =DATEVALUE(SUBSTITUTE(A1,LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1),""))

    Biff

    <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > How would I grab the date out of a string where the date text is
    > located at the end of the string? The string is of variable length. IE
    >
    > "I need your help 2 jun 2006"
    > "I have no idea what I'm doing 2 jun 2006"
    >
    > I'll need to convert the date string into a integer date value.
    > Thanks for your help
    >




  5. #5
    Aladin Akyurek
    Guest

    Re: How do I grab the date from a text string?

    I'd go with Bondi's suggestion, unless you have substrings like 4Jan06
    or 2 aug 99.

    [email protected] wrote:
    > Hi,
    >
    > How would I grab the date out of a string where the date text is
    > located at the end of the string? The string is of variable length. IE
    >
    > "I need your help 2 jun 2006"
    > "I have no idea what I'm doing 2 jun 2006"
    >
    > I'll need to convert the date string into a integer date value.
    > Thanks for your help
    >


+ 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