get LocalDateTime from ISO Date String as 2014-01-01 00:00:00 - Java java.time

Java examples for java.time:LocalDateTime

Description

get LocalDateTime from ISO Date String as 2014-01-01 00:00:00

Demo Code


//package com.java2s;

import java.time.LocalDateTime;

public class Main {
    public static LocalDateTime getDateTimeISODateString(String in) {
        //2014-01-01 00:00:00
        return LocalDateTime.parse(in.replace(" ", "T"));
    }//from w ww  . j  a  v  a  2  s  .c  o m
}

Related Tutorials