Skip to main content
Version: Java (Groovy)

epochMicros

Returns microseconds from the Epoch for a date-time value.

Syntax

epochMicros(instant)
epochMicros(dateTime)

Parameters

ParameterTypeDescription
instantInstant

Instant to compute the Epoch offset for.

dateTimeZonedDateTime

ZonedDateTime to compute the Epoch offset for.

Returns

Microseconds from the Epoch.

Examples

datetime = parseInstant("2022-01-01T05:04:02 ET")
println epochMicros(datetime)