Changing the date format from dd/mm/yyyy to ddmmyy in excel 2010

Hi

I have an  2010 excel file with 200 user details  and their date of birth is populated in  dd/mm/yyyy ( 29/06/2001)on one of the colums.
I want to convert this format into ddmmyy  (290601) . This data is on colum H and if i go to the particular row and remove the / and 20, some other date populates.

Please let me know if there is a way to achieve this.
Thanks
lianne143Asked:
Who is Participating?
 
Lee W, MVPConnect With a Mentor Technology and Business Process AdvisorCommented:
Repeat - use a custom format but enter the dates in whatever local date format you normally use.
This is simple.  Right click the column (or select the cells), select format cells, select custom under category, type in "ddmmyy" as the format.

DONE.
0
 
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
Assuming your date is in H2 then try this....
=TEXT(DATE(RIGHT(H2,4),MID(H2,4,2),LEFT(H2,2)),"ddmmyy")

Open in new window

0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Or you may try the following code to change the dates in the desired format...

Sub ChangeDateFormat()
Dim lr As Long
Dim rng As Range, cell As Range
lr = Cells(Rows.Count, "H").End(xlUp).Row
Set rng = Range("H2:H" & lr)
For Each cell In rng
   cell = Format(cell.Value, "ddmmyy")
Next cell
End Sub

Open in new window

0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Lee W, MVPConnect With a Mentor Technology and Business Process AdvisorCommented:
Use a custom format. Enter the dates CORRECTLY when typing them in - for example 6/29/01 but set the custom format for the cells to be "ddmmyy"
0
 
lianne143Author Commented:
All the 200 date of birth is on the colum H  and it starts from H2 to H218
Please post me the formula for this

Thanks
0
 
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
I assume default date format at your end is US date format i.e. mm/dd/yyyy so the dates what you get won't be recognized as dates. Remember that dates are treated as numbers by Excel behind the scene and in this case your dates look like dates but they are text strings.

To convert them to the desired format, try one of the suggested solutions.
If you place the formula in I2, you just need to copy it down and if you go for the VBA solution, you just need to run the code once to get all the dates in column H into the desired date format.
0
 
lianne143Author Commented:
Hi Subodh

Please post me step by step instructions and my Excel sheet is called data
All the 200 date of birth is on the colum H  and it starts from H2 to H218
Thanks
0
 
lianne143Author Commented:
Thanks you very much Lee
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.