Carol.Kar
Carol.Kar

Reputation: 5345

Convert date/time string into numeric value

I would like to convert this date:

April 01, 2015 at 02:11PM

into Excel date format. I tried Format Cell and then I looked through several dates, but no format fitted.

Any recommendation how to convert it properly?

Upvotes: 0

Views: 144

Answers (2)

Karl D
Karl D

Reputation: 63

I believe that when you use the formula =now() you only get the date but you actually want the time

=TEXT(NOW(),"hh:mm:ss AM/PM")

  • If you have today´s date on Cell A1

=TEXT(A1,"hh:mm:ss AM/PM")

Upvotes: 0

pnuts
pnuts

Reputation: 59440

Please try:

=VALUE(MID(A1,FIND(" ",A1)+1,2)&"-"&LEFT(A1,FIND(" ",A1)-1)&"-"&MID(A1,FIND(",",A1)+2,4)&" "&MID(A1,FIND("at ",A1)+3,5)&" "&RIGHT(A1,2))  

with formatting to suit.

Upvotes: 2

Related Questions