jpsimmon

New Member
Joined
Apr 9, 2015
Messages
25
Hey Guys/Gals,
I have been using a date swap formula to basically swap the month and day between "/" slashes.

=IF(ISTEXT(C7),DATE(RIGHT(C7,4),LEFT(C7,SEARCH("/",C7)-1),MID(C7,SEARCH("/",C7)+1,2)),DATEVALUE(TEXT(C7,"mm/dd/yyyy")))

I originally was working on the formula for sample dates such as: 2/28/2023
But the problem now is; I am running across dates that have the YEAR as just 2-digits, such as: 2/28/23
The result is some of my new dates are coming in as 2/28/23 = Feb 2, 1923. Is there anyway I could make it so it would have this always in the millennium? Such as: 2/28/23 or 2/28/2023 equaling = 28/2/2023.

Can you help? Thanks
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

JonXL

Active Member
Joined
Feb 5, 2018
Messages
414
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is there a reason you can't just specify the desired formatting in the Formatting dialogue?

DD/MM/YYYY
 

Watch MrExcel Video

Forum statistics

Threads
1,123,311
Messages
5,600,886
Members
414,414
Latest member
neil_c

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
Top