trying to change dd/mm/yy to mm/dd/yy

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
846
Office Version
  1. 2013
Platform
  1. Windows
[TABLE="width: 500"]
<tbody>[TR]
[TD]Dates[/TD]
[TD][/TD]
[TD]Text to Columns[/TD]
[TD]Text to Columns[/TD]
[TD]Text to Columns[/TD]
[TD][/TD]
[TD]Search "/"[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]23/11/2018[/TD]
[TD][/TD]
[TD]23[/TD]
[TD]11[/TD]
[TD]2018[/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/3/2019[/TD]
[TD][/TD]
[TD]1/1/1900[/TD]
[TD]3[/TD]
[TD]2019[/TD]
[TD][/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: center"]#VALUE![/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]31/03/2019[/TD]
[TD][/TD]
[TD]31[/TD]
[TD]3[/TD]
[TD]2019[/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/11/2018[/TD]
[TD][/TD]
[TD]1/1/1900[/TD]
[TD]11[/TD]
[TD]2018[/TD]
[TD][/TD]
[TD] #VALUE![/TD]
[TD][/TD]
[/TR]
[TR]
[TD]24/10/2018[/TD]
[TD][/TD]
[TD]24[/TD]
[TD]10[/TD]
[TD]2018[/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



The first column above shows the dates I have. I've tried changing them from dd/mm to mm/dd but it doesn't seem to be responding properly.

As one example I tried going to Text to Columns so that I could separate it into individual parts. Didn't work out too well. I later used the front-slash as the separator but the results were weird. You can see the results in columns B-E above. I've bolded/underlined the cells not behaving properly.


Can anyone advise what's going on?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
If you use Text to Columns so that cell B2 is 23, C2 is 11, and D2 is 2018, you can convert to a date using this formula:
Code:
=DATE(D2,C2,B2)
And since it is now a date, you can apply any Date format on it that you like.
 
Upvote 0
With text to columns, Delimited > uncheck all boxes > select DMY > OK
 
Upvote 0
So many posts here have US style dates, that when I copy the data to Xl I've got to do it, but selecting MDY instead.
So it's difficult to forget :laugh:
 
Upvote 0
Thanks guys.

I think I may not have been clear. If you see the data above, the third and fifth rows have something weird going on, where they're not responding to the Text to Columns function or to the search function properly. I'm wondering what's going on and how to fix that.
 
Upvote 0
I am pretty sure it is because you have mixed data types there. If you notice some entries are right-justified and others are left-justified, that is a dead giveaway.

23/11/2018 is not a valid date if using the US format, so it is coming across as Text.
3/1/2018 IS a valid date, so it is coming across as a Date.

Valid dates are actually stored as numbers, specifically the number of days since 1/0/1900. They just have some sort of date format applied.
However, formats only affect the display, not the underlying value. So real dates do NOT have a "/" in their actual value. It is just the date format showing that.

To see this more clearly, highlight column A and change the format to "General", and you will see the text and dates as Excel sees them.
 
Last edited:
Upvote 0
Change the format of Col B to general, that will stop it from showing as a date.
What is your search function?
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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