Java ZonedDateTime Format toZonedDateTime(String date, DateTimeFormatter formatter)

Here you can find the source of toZonedDateTime(String date, DateTimeFormatter formatter)

Description

to Zoned Date Time

License

Open Source License

Declaration

public static ZonedDateTime toZonedDateTime(String date, DateTimeFormatter formatter) 

Method Source Code

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

import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class Main {
    public static ZonedDateTime toZonedDateTime(String date, DateTimeFormatter formatter) {
        try {/*from  w ww  .jav a2  s .  co m*/
            return ZonedDateTime.parse(date, formatter);
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
    }
}

Related

  1. formatDateTime(ZonedDateTime zonedDateTime)
  2. formatZonedDateTime(ZonedDateTime zonedDateTime)
  3. getFormattedHour(ZonedDateTime dateTime)
  4. parseZonedDateTime(String s, DateTimeFormatter dtf)
  5. toStringExcelFormat(ZonedDateTime date)