Strip date from date/time cell, format correctly so it's recognised as a date by Excel?

robdav

New Member
Joined
Dec 1, 2017
Messages
15
Hi

I get sent a csv file with a cell containing the date and time like this "30.11.2017 17:40:41", remember I'm in England so dd/mm/yyyy is the format we use.

If I use the two commands below I can get just the date as 30/11/2017 but Excel doesn't recognise it as a date until I click in the cell and then click out off the cell. Not quite sure why but I don't want to do that for every cell.

Is there a better way to do this or at least a way to get Excel to recognise it as a date?

Many thanks

Rob

=LEFT(A1,LEN(A1-9)
=SUBSTITUTE(A1,".","/")
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
This will turn it into a date. format cell as date
Code:
=SUBSTITUTE(LEFT(A1,SEARCH(" ",A1)-1),".","/")+0
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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