Link to home
Start Free TrialLog in
Avatar of AndresHernando
AndresHernando

asked on

Excel - Extract date from a text string

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
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndresHernando
AndresHernando

ASKER

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.
Multiply the solution formula x1 (times one), and now the text string is recognized as a date.
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