Java LocalDateTime to toStringIfPresent(LocalDateTime dateTime)

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

Description

to String If Present

License

Open Source License

Declaration

public static String toStringIfPresent(LocalDateTime dateTime) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.LocalDateTime;

public class Main {
    public static String toStringIfPresent(LocalDateTime dateTime) {
        if (dateTime != null) {
            return dateTime.toString();
        } else {// w w  w .j av  a  2  s. co m
            return null;
        }
    }
}

Related

  1. toJava8(org.joda.time.LocalDateTime x)
  2. toJsonDate(LocalDateTime date)
  3. tokenExpired(LocalDateTime expiryDate)
  4. toMinuteCount(LocalDateTime ldt)
  5. toString(LocalDateTime time)
  6. toUtilDate(LocalDateTime localDateTime)
  7. validateTime(LocalDateTime timestamp)