Home > Software engineering >  How do I change a date in 19950428 to 4/28/1995 in excel?
How do I change a date in 19950428 to 4/28/1995 in excel?

Time:01-24

I have a data as show below in excel with column F having a different date format yyyymmdd as text.

enter image description here

For example 19900216. I need it to be in this format 2/16/1990

Any help I could would be appreciated.

CodePudding user response:

Depends if you want it converting to a date value (so you can base other cell formulas on it) or just as a text string.

Text String:
=RIGHT(A1, 2) & "/" & MID(A1, 5, 2) & "/" & LEFT(A1, 4)

Date Value:
=DATE(LEFT(A1, 4), MID(A1, 5, 2), RIGHT(A1, 2)) then change the cell number formatting to get the desired date format.

(where A1 is the cell to be converted)

CodePudding user response:

you can use Excel's "Text To Columns" feature to achieve your required outcome. I have linked an article below that shows how to use the Text To Columns feature to convert the dates, however, if that article doesn't help you, I'm sure you will be able to find more articles online.

https://www.myonlinetraininghub.com/6-ways-to-fix-dates-formatted-as-text-in-excel

  •  Tags:  
  • Related