• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 643
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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