Skip to main content
Version: Java (Groovy)

secondsToNanos

secondsToNanos returns the equivalent number of nanoseconds to the specified seconds value.

Syntax

secondsToNanos(seconds)

Parameters

ParameterTypeDescription
secondslong

The amount of seconds to convert to nanoseconds.

Returns

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

Examples

In the following example, a new column (Nanos) is added that converts the specified seconds into a DateTime.

seconds = 132

println secondsToNanos(seconds)