Converting date in excel

2019-09-08 03:39发布

I need to convert the below date format in excel.

Currently I have: Fri Jan 06 05:10:31 2017

Current Format : ddd MMM dd hh:mm:ss yyyy

I wanted to be in the following format: dd/mm/yyyy hh:mm:ss

标签: excel date
4条回答
我命由我不由天
2楼-- · 2019-09-08 03:41

You need to remove the day from the string, convert it to a number then format the way you want.

To do the first two steps use this formula:

=--MID(A1,5,LEN(A1))

enter image description here

The third is a custom format:

enter image description here


As per the comment:

enter image description here

查看更多
Anthone
3楼-- · 2019-09-08 03:41

If you are running into trouble with regional DMY vs. MDY system settings, parse it out longhand so no interpretation is performed; i.e. give the conversion no options.

=DATEVALUE(REPLACE(MID(A2, 4, LEN(A2)), 8, 9, ","))+TIMEVALUE(MID(A2, 12, 8))

enter image description here

查看更多
贼婆χ
4楼-- · 2019-09-08 03:47

Yet another approach:

=DATEVALUE(MID(A1,9,2)&MID(A1,5,3)&RIGHT(A1,4))
查看更多
一纸荒年 Trace。
5楼-- · 2019-09-08 03:48

You can format it and everything from the formula bar (no need to go in and set formatting).

=TEXT(MID(A1,5,LEN(A1)),"dd/mm/yyyy hh:mm:ss")

enter image description here

查看更多
登录 后发表回答