Java examples for java.time:LocalDateTime
get Long ISO Date Time String from LocalDateTime
//package com.java2s; import java.time.LocalDate; import java.time.LocalDateTime; public class Main { public static String getLongISODateTimeString(LocalDateTime in) { String temp = in.toString(); String bad = "2015-01-02T00:00"; if (temp.length() == bad.length()) temp += ":00"; return temp; }//w w w . j a v a 2s . c o m public static String getLongISODateTimeString(LocalDate in) { String temp = in.toString(); String bad = "2015-01-02"; if (temp.length() == bad.length()) temp += "T00:00:00"; return temp; } }