List of utility methods to do ZonedDateTime Format
ZonedDateTime | parseZonedDateTime(String s, DateTimeFormatter dtf) parse Zoned Date Time DateTimeFormatter f = dtf.withResolverStyle(ResolverStyle.STRICT); LocalDateTime ldt; if (dtf == UUUU_MM_DD) { LocalDate ld = LocalDate.parse(s, f); LocalTime lt = LocalTime.of(0, 0, 0); ldt = LocalDateTime.of(ld, lt); } else { ldt = LocalDateTime.parse(s, f); ... |
String | toStringExcelFormat(ZonedDateTime date) to String Excel Format if (date == null) return ""; return DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss").format(date); |
ZonedDateTime | toZonedDateTime(String date, DateTimeFormatter formatter) to Zoned Date Time try { return ZonedDateTime.parse(date, formatter); } catch (Exception e) { throw new IllegalArgumentException(e); |