converting date format

zebra7860

Active Member
Joined
Jan 9, 2004
Messages
390
Hi,

I have half a spreadsheet with the date format in the mm/dd/yyyy, followed by the other half with the format I need: YYYY.mm.dd

I tried converting it but couldn't do it.

ANy ideas?

Thank you!
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
18,331
Office Version
2013
Platform
Windows
Have you highlighted the cells and changed the format using
Rclick>>format>> Custom>>change the 'type' as "yyy.mm.dd"

or by formula

Code:
=TEXT(A1,"yyy.mm.dd")
 

zebra7860

Active Member
Joined
Jan 9, 2004
Messages
390
Have you highlighted the cells and changed the format using
Rclick>>format>> Custom>>change the 'type' as "yyy.mm.dd"

or by formula

Code:
=TEXT(A1,"yyy.mm.dd")

Neither works.

I also tried yyyy.mm.dd........perhaps that was an error in your answer?

Thanks anyway
 

zebra7860

Active Member
Joined
Jan 9, 2004
Messages
390
Keep in mind that this data was in a CSV format and I copied it into a spreadsheet. Perhaps that has
something to do with the fact that it cant be edited?
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
18,331
Office Version
2013
Platform
Windows
Yeah sorry, typo....
Maybe VBA
Highlight the range to be changed then run

Code:
Sub MM1()
For Each cell In Selection
    cell.Value = Format(cell.Value, "yyyy.mm.dd")
Next cell
End Sub
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
18,331
Office Version
2013
Platform
Windows
glad it worked and thanks for the feedback...(y)
 

Forum statistics

Threads
1,086,246
Messages
5,388,675
Members
402,134
Latest member
McKnze21

Some videos you may like

This Week's Hot Topics

Top