Number date to actual date conversion issue

SusieL

New Member
Joined
Jun 1, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a report where the date is reported as dmmyyyy, so example 8052021 - the problem I have is that I cannot convert this to show 5/8/2021 due to the 1 digit day. If I have 16052021 I can easily convert it to 5/16/2021 but it does not work for the one digit day ones. Does anyone have a fix for this?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi, welcome to the forum. Assuming your regional settings are set for UK/EU date formats, you could try this.

Book1
AB
1805202108/05/2021
Sheet1
Cell Formulas
RangeFormula
B1B1=0+TEXT(TEXT(A1,REPT(0,8)),"00\/00\/0000")


You may need to format the cell that contains the formula as a date.
 
Upvote 0
If your regional setting are for US date formats then you can use this formula to replace the leading zero from which you can probably continue with the method you are currently using for the two digit days.

Excel Formula:
=TEXT(A1,REPT(0,8))
 
Upvote 0
Hi & welcome to MrExcel
How about
Excel Formula:
=TEXT(A2,"0\/00\/0000")+0
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

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