Example usage for java.time LocalDateTime query

List of usage examples for java.time LocalDateTime query

Introduction

In this page you can find the example usage for java.time LocalDateTime query.

Prototype

@SuppressWarnings("unchecked")
@Override 
public <R> R query(TemporalQuery<R> query) 

Source Link

Document

Queries this date-time using the specified query.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00);

    LocalTime t = a.query(TemporalQueries.localTime());

    System.out.println(t);//from   w  w w . j  a v a2  s. com
}