Java ZonedDateTime Format toStringExcelFormat(ZonedDateTime date)

Here you can find the source of toStringExcelFormat(ZonedDateTime date)

Description

to String Excel Format

License

Open Source License

Declaration

public static String toStringExcelFormat(ZonedDateTime date) 

Method Source Code

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

Related

  1. formatDateForGMT(ZonedDateTime moonDate)
  2. formatDateTime(ZonedDateTime zonedDateTime)
  3. formatZonedDateTime(ZonedDateTime zonedDateTime)
  4. getFormattedHour(ZonedDateTime dateTime)
  5. parseZonedDateTime(String s, DateTimeFormatter dtf)
  6. toZonedDateTime(String date, DateTimeFormatter formatter)