How to convert the text to date format in excel

2019-01-29 09:05发布

问题:

  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.

  3. The converted text should be in mm/dd/yyyy format.

回答1:

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.