Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bondi
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default 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

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default 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

wrote in message
oups.com...
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default 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.

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
How do I extract a date as text not the 1900 reference number Adam Excel Discussion (Misc queries) 3 March 23rd 05 05:04 PM
Excel enters date as a text format Kane Excel Discussion (Misc queries) 3 March 22nd 05 09:20 PM
How to convert string to a date galsaba Excel Worksheet Functions 3 March 4th 05 05:20 PM
How do I convert a number formated as a date to text in Excel? BrotherNov Excel Discussion (Misc queries) 5 March 2nd 05 03:51 PM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"