Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

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
0
AndresHernando
Asked:
AndresHernando
  • 2
  • 2
1 Solution
 
barry houdiniCommented:
Perhaps try this

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

That will give the result as a text string

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now