Formatting Date(YY:MM:DD:Time) in Excel

前端 未结 3 765
失恋的感觉
失恋的感觉 2021-01-28 18:24

I have an excel file, with a date column, but I want to convert the date column to

YY/MM/DD/Time

Ive been searching for 2 hours and no result y

3条回答
  •  野性不改
    2021-01-28 18:45

    You could use this method and split the date and time into separate cells:

    =DATE((LEFT(A1,4)),(MID(A1,5,2)),MID(A1,7,2))
    
    =TIME(MID(A1,10,2),(MID(A1,12,2)),0)
    

    Once your date value is in a format Excel can recognize, you can then change the formatting to whatever you'd like.

    Or if you don't care to have the value in a recognizable date format, you can just get your desired formatting like this (will give you a string that looks like this: YY/MM/DD/Time):

    =MID(A1,3,2)&"/"&MID(A1,5,2)&"/"&MID(A1,7,2)&"/"&MID(A1,10,4)
    

提交回复
热议问题