DateTime.FromText
Creates a datetimezone from local and universal datetime formats.
Syntax
DateTime.FromText(
text as text,
optional options as any
) as datetime
Remarks
Creates a datetime value from a textual representation, text. An optional record parameter, options, may be provided to specify additional properties. The record can contain the following fields:
Format: Atextvalue indicating the format to use. For more details, go to https://go.microsoft.com/fwlink/?linkid=2180104 and https://go.microsoft.com/fwlink/?linkid=2180105. Omitting this field or providingnullwill result in parsing the date using a best effort.Culture: WhenFormatis not null,Culturecontrols some format specifiers. For example, in"en-US""MMM"is"Jan", "Feb", "Mar", ..., while in"ru-RU""MMM"is"янв", "фев", "мар", .... WhenFormatisnull,Culturecontrols the default format to use. WhenCultureisnullor omitted,Culture.Currentis used.
To support legacy workflows, options may also be a text value. This has the same behavior as if options = [Format = null, Culture = options].