What is the right way to make a TIMACT_NS field?

Why is "value" null in the following? What is the right way to make a TIMACT_NS field?

FieldEntry fieldEntry = createFieldEntry();

FieldEntry value = fieldEntry.intValue(TIMACT_NS.fieldId(), TimeUnit.MILLISECONDS.toNanos(timestamp.toEpochMilli()));

Tagged:

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hi @martin.eriksen,

    The TIMACT_NS is a time field rather then an integer field:

    TIMACT_NS  "TIMEACT NS"         14269  NULL        INTEGER            15  TIME             8

    Please use the time() instead of intValue() method to encode the nanosecond timestamp into the field entry.

    See the method signature here.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.