How to convert this start date time format "20241226T000000" into "2024-12-26 00:00:00".

shashanksha
Tera Contributor

How to convert this start date time format "20241226T000000" into "2024-12-26 00:00:00". this format as i need to compare this to current planned start time. Could you please help me out over this.

1 REPLY 1

Shruti
Mega Sage
Mega Sage
var gdt = new GlideDateTime();
gdt.setDisplayValue("20241226T000000", "yyyyMMdd'T'HHmmss");
gs.info(gdt.getDisplayValueInternal());