excel Google Sheet将字符串转换为DATE_TIME

4zcjmb1e  于 2023-04-07  发布在  Go
关注(0)|答案(2)|浏览(111)

我有一个列在谷歌工作表,看起来像下面。
我试着使用TO_DATE函数,因为我想要它的格式3/30/2023 07:56:26,但无论我做什么,我不能转换这在谷歌表?有什么方法可以做到这一点?

DATE
March 30, 2023, 07:56:26 pm EDT
March 19, 2023, 10:05:49 am EDT
March 31, 2023, 04:07:33 pm EDT
March 24, 2023, 12:49:36 pm EDT
March 30, 2023, 05:31:48 am EDT
March 27, 2023, 05:12:40 am EDT
March 29, 2023, 10:49:10 pm EDT
March 27, 2023, 06:22:56 pm EDT
March 22, 2023, 10:54:24 am EDT
March 25, 2023, 06:18:20 pm EDT
March 28, 2023, 12:11:30 pm EDT
dgenwo3n

dgenwo3n1#

你可以试试:

=arrayformula(--regexreplace(A2:A12,"(,| [A-Z]{3})",""))
  • 将formula_column格式化为***Number〉Date time***,以获得正确的时间戳外观

am46iovg

am46iovg2#

由于您已标记Excel,因此可以使用TEXTBEFORE()进行解析

·单元格B2中使用的公式

=SUBSTITUTE(TEXTBEFORE(A2:A12," EDT"),",",,2)+0

并将单元格格式设置为m/d/yyyy hh:mm:ss AM/PM

相关问题