Language

LocalDateTime.From(ITemporalAccessor) Method

Definition

Obtains an instance of LocalDateTime from a temporal object.

[Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/LocalDateTime;", "", ApiSince=26)]
public static Java.Time.LocalDateTime? From(Java.Time.Temporal.ITemporalAccessor? temporal);
[<Android.Runtime.Register("from", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/LocalDateTime;", "", ApiSince=26)>]
static member From : Java.Time.Temporal.ITemporalAccessor -> Java.Time.LocalDateTime

Parameters

temporal
ITemporalAccessor

the temporal object to convert, not null

Returns

the local date-time, not null

Attributes

Remarks

Obtains an instance of LocalDateTime from a temporal object. This obtains a local date-time based on the specified temporal. A TemporalAccessor represents an arbitrary set of date and time information, which this factory converts to an instance of LocalDateTime. The conversion extracts and combines the LocalDate and the LocalTime from the temporal object. Implementations are permitted to perform optimizations such as accessing those fields that are equivalent to the relevant objects. This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, LocalDateTime::from.

Java reference for java.time.LocalDateTime.from.

Applies to