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

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
843
Office Version
  1. 2013
Platform
  1. Windows
DatesText to ColumnsText to ColumnsText to ColumnsSearch "/"
23/11/2018231120183
1/3/20191/1/190032019
#VALUE!

<tbody>
</tbody>
31/03/201931320193
1/11/20181/1/1900112018 #VALUE!
24/10/2018241020183

<tbody>
</tbody>



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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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
With text to columns, Delimited > uncheck all boxes > select DMY > OK
Forgot about that!
 
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 :LOL:
 
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,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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