Language

ZonedDateTime.Parse Method

Definition

Overloads

Name Description
Parse(String, DateTimeFormatter)

Parses a zoned date-time string with the specified formatter.

Parse(ICharSequence, DateTimeFormatter)

Obtains an instance of ZonedDateTime from a text string using a specific formatter.

Parse(String)

Parses an ISO date and time with a time zone from a string.

Parse(ICharSequence)

Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris].

Parse(String, DateTimeFormatter)

Parses a zoned date-time string with the specified formatter.

public static Java.Time.ZonedDateTime? Parse(string? text, Java.Time.Format.DateTimeFormatter? formatter);
static member Parse : string * Java.Time.Format.DateTimeFormatter -> Java.Time.ZonedDateTime

Parameters

text
String

The string that contains the date, time, and time-zone fields.

formatter
DateTimeFormatter

The formatter that reads the date, time, and time-zone fields.

Returns

The zoned date and time read from text.

Remarks

This string overload calls Parse(ICharSequence, DateTimeFormatter). The supplied formatter determines the input format.

Applies to

Parse(ICharSequence, DateTimeFormatter)

Obtains an instance of ZonedDateTime from a text string using a specific formatter.

[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? Parse(Java.Lang.ICharSequence? text, Java.Time.Format.DateTimeFormatter? formatter);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;Ljava/time/format/DateTimeFormatter;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence * Java.Time.Format.DateTimeFormatter -> Java.Time.ZonedDateTime

Parameters

text
ICharSequence

the text to parse, not null

formatter
DateTimeFormatter

the formatter to use, not null

Returns

the parsed zoned date-time, not null

Attributes

Remarks

Obtains an instance of ZonedDateTime from a text string using a specific formatter. The text is parsed using the formatter, returning a date-time.

Java reference for java.time.ZonedDateTime.parse.

Applies to

Parse(String)

Parses an ISO date and time with a time zone from a string.

public static Java.Time.ZonedDateTime? Parse(string? text);
static member Parse : string -> Java.Time.ZonedDateTime

Parameters

text
String

The zoned date-time text, for example 2007-12-03T10:15:30+01:00[Europe/Paris].

Returns

The zoned date and time read from text.

Remarks

This string overload calls Parse(ICharSequence) and uses IsoZonedDateTime.

Applies to

Parse(ICharSequence)

Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris].

[Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? Parse(Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("parse", "(Ljava/lang/CharSequence;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member Parse : Java.Lang.ICharSequence -> Java.Time.ZonedDateTime

Parameters

text
ICharSequence

the text to parse such as "2007-12-03T10:15:30+01:00[Europe/Paris]", not null

Returns

the parsed zoned date-time, not null

Attributes

Remarks

Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris]. The string must represent a valid date-time and is parsed using DateTimeFormatter.ISO_ZONED_DATE_TIME.

Java reference for java.time.ZonedDateTime.parse.

Applies to