Excel 2013 date format conversion. 30 Jan, 15 18:02:05 to 30.01.2015

て烟熏妆下的殇ゞ 提交于 2019-12-25 04:44:09

问题


In MS Excel 2013 I import a CSV file, no matter if I format it using the delimined or any other option the results are the same. My date in Excel looks like: 30 Jan, 15 18:02:05 in a single cell. All I need is to convert it to a date format 30.01.2015 for example. I have a column of these and need to convert the values at once. (I tried TEXT, DATE, MID, DATEVALUE, MONTH, DATEVALUE...) but none of them are able to convert the date format. Also it does not matter if I convert it with format cells...to date it always displays the same i.e. 30 Jan, 15 18:02:05

Not sure what I am doing wrong. Getting a bit frustrating, thanks for any advice. Most of the above give a #VALUE error.


回答1:


With data in A1 in B1 enter:

=DATEVALUE(LEFT(A1,FIND(" ",A1)-1) & "-" & MID(A1,FIND(" ",A1)+1,3) & "-20" & MID(A1,FIND(",",A1)+2,2))

and format B1 as dd.mm.yyyy for example:



来源:https://stackoverflow.com/questions/28345674/excel-2013-date-format-conversion-30-jan-15-180205-to-30-01-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!