Java LocalDateTime parse String like "2020-12-28T08:44:00"

Description

Java LocalDateTime parse String like "2020-12-28T08:44:00"

import java.time.LocalDateTime;

public class Main {

  public static void main(String[] args) {


    LocalDateTime ldt = LocalDateTime.parse("2020-12-28T08:44:00");

    System.out.println("Parsed Date-Time: " + ldt);

  }/*from w  ww . jav a  2  s. c o m*/
}



PreviousNext

Related