Java LocalDateTime Calculate oldDateToISO8601LocalDateTime(Date nextColumnDate)

Here you can find the source of oldDateToISO8601LocalDateTime(Date nextColumnDate)

Description

old Date To ISO Local Date Time

License

Open Source License

Declaration

public static String oldDateToISO8601LocalDateTime(Date nextColumnDate) 

Method Source Code

//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*/
}

Related

  1. isTodayOrYesterday(LocalDateTime date)
  2. isWithin(LocalDateTime start, LocalDateTime end)
  3. last(LocalDateTime from, int dayOfWeek)
  4. localDateTime2LocalDate(LocalDateTime localDateTime)
  5. ms2LocalDateTime(final long ms)
  6. parseStringToLocalDateTimeWithSpecifiedTime(String strDate, String time)
  7. parseTimeStamp(LocalDateTime actualDate, LocalDateTime checkedDate, boolean isDateFrom)
  8. printDateTime(LocalDateTime dateTime)
  9. relativeDateTime(final LocalDateTime contextDate, final String str, final boolean add)