Date.ToInstant Method

Definition

Converts this Date object to an Instant.

[Android.Runtime.Register("toInstant", "()Ljava/time/Instant;", "GetToInstantHandler", ApiSince=26)]
public virtual Java.Time.Instant? ToInstant ();
[<Android.Runtime.Register("toInstant", "()Ljava/time/Instant;", "GetToInstantHandler", ApiSince=26)>]
abstract member ToInstant : unit -> Java.Time.Instant
override this.ToInstant : unit -> Java.Time.Instant

Returns

an instant representing the same point on the time-line as this Date object

Attributes

Remarks

Converts this Date object to an Instant.

The conversion creates an Instant that represents the same point on the time-line as this Date.

Added in 1.8.

Java documentation for java.util.Date.toInstant().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to