Here you can find the source of oldDateToISO8601LocalDateTime(Date nextColumnDate)
public static String oldDateToISO8601LocalDateTime(Date nextColumnDate)
//package com.java2s; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; public class Main { public static String oldDateToISO8601LocalDateTime(Date nextColumnDate) { LocalDateTime localDateTime = nextColumnDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); String formattedDate = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(localDateTime); return formattedDate; }/*from ww w.j ava2 s . c o m*/ }