格式化时间戳

时间:2018-09-12 22:19:40

标签: excel date time split format

我正在尝试将时间戳“ 2018-08-08T00:20:52.522Z”转换为dd-mm-yyyy hour-minute的格式,以进行数据分析。在此时间戳中,我无法从中间删除“ T”,也无法删除代表时区偏移量的后四位数字。

我无法拆分时间戳或在时间戳上添加空间。任何帮助表示赞赏。

谢谢。

1 个答案:

答案 0 :(得分:0)

例如,如果您的数据位于单元格A1中,请使用公式> dput(G) structure(list(15, FALSE, c(13, 7, 9, 14, 10, 5, 4, 11, 6, 7, 14, 4, 13, 9, 10, 5, 5, 13, 9, 6, 7, 14, 12, 10, 14, 10, 11, 13, 9, 10, 12, 14, 8, 7, 11, 12, 8, 13, 14, 9, 11, 13, 13, 12, 14, 10, 13, 12, 14, 12, 13, 13, 14, 14), c(0, 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13), c(6, 11, 5, 15, 16, 8, 19, 1, 9, 20, 33, 32, 36, 2, 13, 18, 28, 39, 4, 14, 23, 25, 29, 45, 7, 26, 34, 40, 22, 30, 35, 43, 47, 49, 0, 12, 17, 27, 37, 41, 42, 46, 50, 51, 3, 10, 21, 24, 31, 38, 44, 48, 52, 53), c(1, 0, 6, 5, 2, 4, 3, 11, 15, 8, 9, 13, 14, 7, 12, 10, 16, 19, 20, 18, 23, 22, 17, 21, 25, 24, 33, 32, 28, 29, 26, 30, 27, 31, 36, 39, 34, 35, 37, 38, 40, 41, 45, 43, 42, 44, 47, 46, 48, 49, 50, 51, 52, 53), c(0, 0, 0, 0, 0, 2, 5, 7, 11, 13, 18, 24, 28, 34, 44, 54), c(0, 2, 2, 7, 16, 24, 26, 34, 40, 42, 46, 49, 51, 53, 54, 54), list(c(1, 0, 1), structure(list(), .Names = character(0)), structure(list(id = c("1351920706", "500102244", "1454425532", "1625050630", "510838353", "1262640078", "681721364", "1351920717", "1260750116", "1524975171", "1070293410", "727198538", "715215233", "1351920666", "500920034")), .Names = "id"), list()), <environment>), class = "igraph") 来分隔日期和LEFT(A1,10)。这些将隔离字符串。然后,您可以使用RIGHT(LEFT(E2,16),5)DATEVALUE将字符串转换为Excel能够将其读取为日期或时间的数字。要使用一个公式,请使用

TIMEVALUE

此公式给出的数字可以设置为日期或时间格式。