Solved

Excel - Extract date from a text string

Posted on 2011-09-16
4
630 Views
Last Modified: 2012-05-12
What's the simplest way to extract the date & time from the following text string:
"This document has been digitally Signed 9/16/2011 6:05:07 PM"

I tried this formula but the result is not being recognized as a MS date/time.
=RIGHT(Rd_Reviewer2Sign,LEN(Rd_Reviewer2Sign)-LEN("This document has been digitally Signed "))

A VBA solution would be best, but a worksheet function (llike I tried) will work.

Thanks, --Andres
0
Comment
Question by:AndresHernando
  • 2
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 36549421
Perhaps try this

=REPLACE(Rd_Reviewer2Sign,1,FIND("Signed",Rd_Reviewer2Sign)+6,"")

That will give the result as a text string

regards, barry
0
 

Author Comment

by:AndresHernando
ID: 36549563
Barry, your equation gives me the same txt string as mine.  Still, the text string "9/16/2011 6:05:07 PM" refuses to be recognized as a date.

But I figured out one way to skin this cat.  I multiplied your formula times 1.  Now it works.

Thanks for your help.
0
 

Author Closing Comment

by:AndresHernando
ID: 36549570
Multiply the solution formula x1 (times one), and now the text string is recognized as a date.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36549661
Sorry I didn't see the part that said "I tried this formula but the result is not being recognized as a MS date/time", otherwise I would have suggested something similar (I usually add zero)

regards, barry
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question