Java DateTimeFormatter parse(String format, String datetime)

Here you can find the source of parse(String format, String datetime)

Description

parse

License

Open Source License

Declaration

public static LocalDateTime parse(String format, String datetime) 

Method Source Code

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

import java.time.LocalDateTime;

import java.time.format.DateTimeFormatter;

public class Main {
    public static LocalDateTime parse(String format, String datetime) {
        return parse(DateTimeFormatter.ofPattern(format), datetime);
    }/* ww w.  j  a  v  a 2s.c o m*/

    public static LocalDateTime parse(DateTimeFormatter formatter, String timestamp) {
        return LocalDateTime.from(formatter.parse(timestamp));
    }
}

Related

  1. getTimeStamp(final String dateTimeFormatPattern)
  2. getTimestampedPath(Path baseFile, TemporalAccessor time, DateTimeFormatter formatter)
  3. parse(DateTimeFormatter formatter, String string)
  4. parse(final DateTimeFormatter formatter, final String value, final ZoneId zoneId)
  5. parse(String _date, String _format)
  6. parseAndFormat(String date, DateTimeFormatter fromFormatter, DateTimeFormatter toFormatter)
  7. parseDateTime(String dateTimeStr, String format)
  8. parseZoneDateTime(String value, DateTimeFormatter formatter)
  9. setDateFormat(String pattern)