Skip to main content
Version: Java (Groovy)

millisToSeconds

millisToSeconds returns the equivalent number of seconds from a given millisecond value.

Syntax

millisToSeconds(millis)

Parameters

ParameterTypeDescription
millislong

The amount of milliseconds to convert to seconds.

Returns

The number of seconds equivalent to the specified milliseconds. Null input values will return NULL_LONG.

Examples

nanos = millisToSeconds(1641013200000)
println nanos