Solved

Excel - Extract date from a text string

Posted on 2011-09-16
4
625 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now