Возможно,
=DATE(
REGEXEXTRACT(A1,"(\d{4})"),
SWITCH(REGEXEXTRACT(A1,"\w{3}"),"Jan",0,"Feb",1,"Mar",2,"Apr",3,"May",4,"Jun",5,"Jul",6,"Aug",7,"Sep",8,"Oct",9,"Nov",10,"Dec",11),
REGEXEXTRACT(A1,"(\d{2}),")
)
+
TIME(
IF(REGEXMATCH(A1,"PM"),12,0)+REGEXEXTRACT(A1,"(\d{2}):"),
REGEXEXTRACT(A1,":(\d{2})"),
0
)
К сожалению, всё это сильно зависит от формата строки.
Формула для массива
=ARRAYFORMULA(
DATE(
REGEXEXTRACT(A1:A12,"(\d{4})"),
SWITCH(REGEXEXTRACT(A1:A12,"\w{3}"),"Jan",0,"Feb",1,"Mar",2,"Apr",3,"May",4,"Jun",5,"Jul",6,"Aug",7,"Sep",8,"Oct",9,"Nov",10,"Dec",11),
REGEXEXTRACT(A1:A12,"(\d{2}),")
)
+
TIME(
IF(REGEXMATCH(A1:A12,"PM"),12,0)+REGEXEXTRACT(A1:A12,"(\d{2}):"),
REGEXEXTRACT(A1:A12,":(\d{2})"),
0
))
Возможно,
SWITCH
- не лучшая идея. Можно заменить на
MATCH
=ARRAYFORMULA(
DATE(
REGEXEXTRACT(A2:A100;"(\d{4})");
MATCH(REGEXEXTRACT(A2:A100;"\w{3}");{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0)-1;
REGEXEXTRACT(A2:A100;"(\d{2}),")
)
+
TIME(
IF(REGEXMATCH(A2:A100;"PM");12;0)+REGEXEXTRACT(A2:A100;"(\d{2}):");
REGEXEXTRACT(A2:A100;":(\d{2})");
0
)
)