Here you can find the source of toStringExcelFormat(ZonedDateTime date)
public static String toStringExcelFormat(ZonedDateTime date)
//package com.java2s; //License from project: Open Source License import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; public class Main { public static String toStringExcelFormat(ZonedDateTime date) { if (date == null) return ""; return DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss").format(date); }//from w w w .jav a 2 s . c o m }