Skip to main content
Version: Java (Groovy)

epochNanosToInstant

epochNanosToInstant converts a value of nanoseconds from Epoch to a date-time Instant.

Syntax

epochNanosToInstant(nanos)

Parameters

ParameterTypeDescription
nanoslong

The nanoseconds since Epoch.

Returns

A date-time representing nanoseconds since Epoch.

Examples

datetime = epochNanosToInstant(1641013200000)
println datetime