How to convert Jan 1 2011 1:23PM text to date/time format

jondugenia

New Member
Joined
Jul 24, 2011
Messages
3
Good day,

I have a excel worksheet with text entries such as...

Jan 1 2011 1:23PM
Jan 1 2011 1:35PM
Jan 1 2011 3:05PM

I'd like to know/learn how to convert this to date/time entries since my worksheet data spans 60,000++ lines.

I tried using format cell function but it did not work and apparently due to the non-comma after the date and the non-space between the time and AM/PM is not helping the conversion.

Hope you can send me advise on this...

Thanks and More Power!!!

Jon D
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
multiply the text by 1.

It should convert any normal date time string into Excel Serial Time format..

Make sure the cells are not formatted as text, they should be formatted as General or Date.

Easy way to multiply a column of dates by 1:

Put 1 in an empty cell and COPY it

Highlight the column of text you want to convert

Right-click and select "Paste Special" > "Paste Special" > Multiply in 2007 or 2010
or just Paste Special and Multiply in 2003.
 
Upvote 0
Good day,

I have a excel worksheet with text entries such as...

Jan 1 2011 1:23PM
Jan 1 2011 1:35PM
Jan 1 2011 3:05PM

I'd like to know/learn how to convert this to date/time entries since my worksheet data spans 60,000++ lines.

I tried using format cell function but it did not work and apparently due to the non-comma after the date and the non-space between the time and AM/PM is not helping the conversion.

Hope you can send me advise on this...

Thanks and More Power!!!

Jon D
This worked for me.

Do Edit>Replace

Find what: PM or AM
Replace with: [space]PM or [space]AM
Replace All

Find what: [space]2011
Replace with: , 2011
Replace All

Of course, you'd have to do this for each different year.

Someone may come along and post a macro to do it. If not, the Edit>Replace should do it.
 
Last edited:
Upvote 0
Oops, I tried it out, The issue is the lack of the comma after the day, and the lack of a space before the PM.

You can use the Ctrl H Replace tool to fix both those errors, or the Function

Substitute() to replace "PM" with " PM" and " 20" with ", 20" and it should work fine after that.
 
Upvote 0
You can use this formula to create your dates...

=--REPLACE(REPLACE(F1,LEN(F1)-1,0," "),FIND(" ",F1,5),1,", ")

and the you can Copy/PasteSpecial their Values over top of your original data.
 
Upvote 0
good day Rick Rothstein, twinetwstr, T. Valko...

It works!!!

mega-thanks for the assist...

pardon late reply, my pc was out...

More Power to Y'all...
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top