question re dates

cart0250

Active Member
Joined
Jun 24, 2006
Messages
284
Office Version
  1. 2016
Platform
  1. Windows
I have dates imported from an external application in the format:

71205

for december 5th 2007, for example
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi There

The reason is that 71205 is a unique way of displaying a date

7 for 07, 12 for Dec, 05 for 5th

You'll need some LEFT's and RIGHT's to align them the way you want
 
Upvote 0
Try this on your data

Code:
=RIGHT(C7, 2)&"/"&LEFT(RIGHT(C7, 4), 2)&"/0"&LEFT(C7, 1)

And see how you get on

KR


Dave
 
Upvote 0
C7 being the cell with your source data BTW
 
Upvote 0
=RIGHT(C7, 2)&"/"&LEFT(RIGHT(C7, 4), 2)&"/0"&LEFT(C7, 1)
 
Upvote 0
would it be:
=LEFT(RIGHT(G3, 4), 2)&"/0"&LEFT(G3, 1)& RIGHT(G3,2)
 
Upvote 0
No I think you may have misunderstood my take on your data

you have

71205 I split this like 7/12/05 and rearranged it to 05/12/07

You now have

70714 which by rights when split up like I first imagined it would be 14/07/07

You data is looking like YMMDD the Rights and Lefts covert it to DD/MM/YY style formatting

HTH


Dave
 
Upvote 0
Actually now I get you, I am formatting UK Style apologies

Yes

Code:
=LEFT(RIGHT(C7, 4), 2)&"/"&RIGHT(C7, 2)&"/0"&LEFT(C7, 1)

would be the US MM/DD/YY format

KR


Dave
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,008
Members
448,935
Latest member
ijat

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