Sub Button1_Click
Log(jo.RunMethod("dformat",Array("2024-11-20T09:47:00", "yyyy-MM-dd'T'HH:mm:ss", "MM/dd/yyyy HH:mm:ss a")))
End Sub
#if Java
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public String dformat(String dateIn, String formatIn,String formatOut) {
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern(formatIn);
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern(formatOut);
LocalDateTime dateTime = LocalDateTime.parse(dateIn, inputFormatter);
return(dateTime.format(outputFormatter));
}
#End If