简体   繁体   English

如何在Excel中将文本转换为日期格式

[英]How to convert the text to date format in excel

  1. How to convert the below text to a date format the current format of the text is general if i try convert the text to date by right clicking the cell and selecting the format cells iam not able to convert. 如果我尝试通过右键单击单元格并选择无法转换的格式单元格将文本转换为日期,则如何将以下文本转换为日期格式是当前文本的常规格式。

  2. My text is "March 10, 2015 1:05:34 PM GMT+05:30" i want to convert this text to date format in excel. 我的文字是“ 2015年3月10日格林尼治标准时间+05:30 PM”,我想将此文字转换为Excel中的日期格式。

  3. The converted text should be in mm/dd/yyyy format. 转换后的文本应为mm / dd / yyyy格式。

Try, 尝试,

=DATEVALUE(TRIM(LEFT(SUBSTITUTE(A2, " ", REPT(" ", 99)), 299)))+TIMEVALUE(LEFT(RIGHT(A2,21), 12))

If you are trying to recover the UTC, then some further parsing of the UTC differential would be necessary. 如果您尝试恢复UTC,则需要进一步解析UTC差异。

time_parse

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM