Example usage for java.time ZonedDateTime getLong

List of usage examples for java.time ZonedDateTime getLong

Introduction

In this page you can find the example usage for java.time ZonedDateTime getLong.

Prototype

@Override
public long getLong(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this date-time as a long .

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();

    System.out.println(dateTime.getLong(ChronoField.DAY_OF_YEAR));
}