Java LocalDateTime Format format(LocalDateTime dateTime)

Here you can find the source of format(LocalDateTime dateTime)

Description

format

License

Open Source License

Declaration

public static String format(LocalDateTime dateTime) 

Method Source Code


//package com.java2s;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;

public class Main {
    public static String format(LocalDateTime dateTime) {
        if (dateTime == null) {
            return null;
        }//from   ww  w  .  j  av a 2  s. co  m
        return dateTime.format(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM));
    }
}

Related

  1. convertDateStringToLocalDateTime(String formattedValue, int hour, int minute)
  2. convertTemporalToSplunkSearchFormat(OffsetDateTime localDateTime)
  3. format(LocalDateTime localDateTime, String pattern)
  4. formatDate(LocalDateTime dateTime)
  5. formatDate(String inPattern, LocalDateTime inTime)
  6. formatDateFromTo(LocalDateTime dateFrom, LocalDateTime dateTo)