Convert US dates to UK dates when import data from text (.csv file) does not work

JennyReed

New Member
Joined
Feb 8, 2011
Messages
23
I have a .csv file with dates in the first column.
The date format is US i.e. mm/dd/yyyy HH:mm:ss.

I am working with UK date format (dd/mm/yyyy HH:mm:ss) and need to convert the date format.
I have tried the following and neither works:

1) Data - From Text - (import .csv file) - Under Text Import Wizard: Delimited - Delimiters (semicolon) - Column data format (changed to MDY) - Finish.
I still get the dates left justified where the US dates have not been converted, right justified where excel thinks it has found a date and converted incorrectly and then right justified again where the dates have not been converted.

2) I wrote in the formula:
=MID(A1,4,2)&"/"&LEFT(A1,2)&"/"&MID(A1,7,4)&" "&RIGHT(A1,8)
This creates the correct 'date' 'text' for the 'unconverted dates' (black dates) but fails where the dates are converted incorrectly (green dates).
04/30/2015 23:49:5030/04/2015 23:49:50
04/30/2015 23:59:5030/04/2015 23:59:50
05/01/2015 00:09
09/42/0068 68287037
05/01/2015 00:1909/42/0137 37731481


05/12/2015 23:4943/42/9929 29398148
05/12/2015 23:5943/42/9998 98842593
05/13/2015 00:09:5013/05/2015 00:09:50
05/13/2015 00:19:5013/05/2015 00:19:50

<tbody>
</tbody>

<tbody>
</tbody>

How can I convert the dates correctly to UK format for the entire date column ?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
VBA would work to use the local regional settings from your pc. Example using local is shown below:

workbook = workbooks.Open(filename, Local:= true)
 
Upvote 0
VBA would work to use the local regional settings from your pc. Example using local is shown below:

Hi Trevor.
Thank you for your answer. I am afraid that I do not understand your answer. 'VBA would work.....'.
Can you explain how I would do this ?

Thank you
Jenny
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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