Remove text characters from Dates in Excel

Hello Experts,

Is there a way to strip text from a date. I know how to use the LEFT and RIGHT functions to remove characters from strings but what about for dates. When I use the LEFT function on the date below to remove the "a",

1/13/15 15:04 a

it becomes a text format that won't change back to date format. When I manually delete the "a", it works fine and stays as a date but I have thousands of these and can't manually do it. Is there a way to strip those "a"s?
LVL 5
Tj aAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gowflowCommented:
Try this by formula where your 1/13/15 15:04 a is in Cell A1
=DATEVALUE(LEFT(A1,LEN(A1)-2))

Now if you have several dates as you mentioned you mean a VBA solution ?
if yes pls post the workbook

gowflow
0
Ejgil HedegaardCommented:
Try this
=DATEVALUE(SUBSTITUTE(A2," a",""))+TIMEVALUE(SUBSTITUTE(A2," a",""))
And format the cell to show date and time.
0
Saqib Husain, SyedEngineerCommented:
Or

=VALUE(LEFT(A1,LEN(A1)-2))
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tj aAuthor Commented:
Great. All the solutions worked. The only thing though about gowflow's solution is that it changes all the timestamps to 12:00. Thank you all.
0
gowflowCommented:
Correct !!!
nice shot Saqib !

gowflow
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.