Table of contents
TOC
Collapse the table of content
Expand the table of content

Date.From

Owen Duncan|Last Updated: 4/19/2018

About

Returns a date value from a value.

Date.From(value as any, optional culture as nullable text) as nullable date  

Arguments

ArgumentDescription
valueValue to convert.
optional cultureA text value corresponding to the culture values supported on your version of Windows, such as "en-US". If the culture is not specified, the current user culture is used. For a list of culture names, see National Language Support (NLS) API Reference.

Values of the following types can be converted to a date value:

TypeDescription
textReturns a Date value from a text value. For more details, see Date.FromText.
datetimeThe Date component of a value.
datetimezoneThe Date component of the local date and time equivalent of a value.
numberThe Date component of the datetime equivalent of the OLE Automation Date of a value.
any other typeAn Expression.Error is thrown.

Remarks

  • If a value is null, Date.From returns null.

  • If a value is date, the same value is returned.

Examples

Date.From(43910) equals #date(2020,3,20)  
Date.From(#datetime(1899, 12, 30, 6, 45, 12)) equals #date(1899,12,30)  
© 2018 Microsoft