日期格式英文/法文

时间:2018-11-19 15:39:28

标签: excel excel-formula excel-2010 excel-2016

我有这种日期格式:

Mon, Nov 19, 2018

我想要法语短日期格式(DD / MM / YYY) 但是我不能用Excel的基本日期格式解决它。 有什么想法吗?

2 个答案:

答案 0 :(得分:2)

您可以使用MATCH返回正确的月份:

=DATE(RIGHT(A1,4),MATCH(TRIM(MID(A1,FIND(" ",A1)+1,3)),{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},0),MID(A1,FIND("}}}",SUBSTITUTE(A1," ","}}}",2))+1,2))

enter image description here

答案 1 :(得分:0)

要将文本转换为日期,可以使用以下公式(假设文本格式的日期位于单元格C15中):

=DATE(RIGHT(C15,4),IF(EXACT(MID(C15,6,3),"Jan"),01,IF(EXACT(MID(C15,6,3),"Feb"),02,IF(EXACT(MID(C15,6,3),"Mar"),03,IF(EXACT(MID(C15,6,3),"Apr"),04,IF(EXACT(MID(C15,6,3),"May"),05,IF(EXACT(MID(C15,6,3),"Jun"),06,IF(EXACT(MID(C15,6,3),"Jul"),07,IF(EXACT(MID(C15,6,3),"Aug"),08,IF(EXACT(MID(C15,6,3),"Sep"),09,IF(EXACT(MID(C15,6,3),"Oct"),10,IF(EXACT(MID(C15,6,3),"Nov"),11,IF(EXACT(MID(C15,6,3),"Dec"),12)))))))))))),MID(C15,10,2))

然后您将获得一个更易于使用的Excel日期。