Language

OffsetDateTime.WithNano(Int32) Method

Definition

Returns a copy of this OffsetDateTime with the nano-of-second altered.

[Android.Runtime.Register("withNano", "(I)Ljava/time/OffsetDateTime;", "", ApiSince=26)]
public Java.Time.OffsetDateTime? WithNano(int nanoOfSecond);
[<Android.Runtime.Register("withNano", "(I)Ljava/time/OffsetDateTime;", "", ApiSince=26)>]
member this.WithNano : int -> Java.Time.OffsetDateTime

Parameters

nanoOfSecond
Int32

the nano-of-second to set in the result, from 0 to 999,999,999

Returns

an OffsetDateTime based on this date-time with the requested nanosecond, not null

Attributes

Remarks

Returns a copy of this OffsetDateTime with the nano-of-second altered. The date and offset do not affect the calculation and will be the same in the result. This instance is immutable and unaffected by this method call.

Java reference for java.time.OffsetDateTime.withNano.

Applies to