Skip to main content
Version: Java (Groovy)

microsOfMilli

microsOfMilli returns the number of microseconds that have elapsed since the top of the millisecond.

Syntax

microsOfMilli(instant)
microsOfMilli(dateTime)

Parameters

ParameterTypeDescription
instantInstant

The date-time from which to return the elapsed time.

dateTimeZonedDateTime

The date-time from which to return the elapsed time.

Returns

The number of microseconds that have elapsed since the start of the millisecond represented by the provided date-time.

note

Null input values will return NULL_LONG. Nanoseconds are rounded, not dropped; e.g., '20:41:39.123456700' has 457 micros, not 456.

Examples


datetime = parseInstant("2023-09-09T12:34:56.123456 ET")

micros = microsOfMilli(datetime)

println micros