Example usage for java.time Instant getLong

List of usage examples for java.time Instant getLong

Introduction

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

Prototype

@Override
public long getLong(TemporalField field) 

Source Link

Document

Gets the value of the specified field from this instant as a long .

Usage

From source file:Main.java

public static void main(String[] args) {
    Instant instant = Instant.parse("2014-12-03T10:15:30.00Z");
    System.out.println(instant.getLong(ChronoField.NANO_OF_SECOND));

}