Convert 20512 To A Date Format

eddiegnz1

New Member
Joined
Jun 5, 2012
Messages
40
I have a column of dates but they lack any format and excel converts it to the wrong date. For example, I need to convert 20512 to 02/05/2012.

Excel takes 30510 and converts it to 07/13/1983 but it should be 03/05/2010. None have a leading zero.

In all cases the last two digits are the year, the next two digits from the right are the day and the rest of the digits are the month.

More examples

11110 = 01/11/2010 (this one has only five digits)

121109 = 12/11/2009 (this one has six digits)

40909 = 04/09/2009 (this one has five digits only)

Kind Thanks,
Eddie
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Format column B as Date

*AB
1111101/11/2010
212110912/11/2009
3409094/9/2009

<colgroup><col style="width:30px; "><col style="width:64px;"><col style="width:92px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=TEXT(A1,"00-00-00")*1
B2=TEXT(A2,"00-00-00")*1
B3=TEXT(A3,"00-00-00")*1

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Hi eddiegnz1,

Try this:

Code:
=IF(LEN(E8)<6,"0"&MID(E8,1,LEN(E8)-4)&"/"&MID(E8,LEN(E8)-3,2)&"/20"&RIGHT(E8,2),MID(E8,1,2)&"/"&MID(E8,LEN(E8)-3,2)&"/20"&RIGHT(E8,2))
 
Upvote 0
I have a column of dates but they lack any format and excel converts it to the wrong date. For example, I need to convert 20512 to 02/05/2012.

Excel takes 30510 and converts it to 07/13/1983 but it should be 03/05/2010. None have a leading zero.

In all cases the last two digits are the year, the next two digits from the right are the day and the rest of the digits are the month.

More examples

11110 = 01/11/2010 (this one has only five digits)

121109 = 12/11/2009 (this one has six digits)

40909 = 04/09/2009 (this one has five digits only)

Kind Thanks,
Eddie
Try this...

Select the range of cells in question
Goto Data>Text to Columns
Click Next twice
In Step 3 of the userform, under Column Data Format, select Date and from the drop down select MDY
Click Finish
 
Upvote 0

Forum statistics

Threads
1,203,171
Messages
6,053,878
Members
444,692
Latest member
Queendom

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