Skip to main content
Version: Java (Groovy)

nanosToMillis

nanosToMillis returns the equivalent number of milliseconds from a given nanosecond value.

Syntax

nanosToMillis(nanos)

Parameters

ParameterTypeDescription
nanoslong

The amount of nanoseconds to convert to milliseconds.

Returns

The equivalent number of milliseconds as the specified nanoseconds. Null input values will return NULL_LONG.

Examples


millis = nanosToMillis(1641013200000)
println millis