Date.From

Date

Converts a value to a date.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

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

Parameters

NameTypeRequiredDescription
valueanyYesThe value to convert to a date. Accepts text, datetime, datetimezone, and number values.
culturetextNoOptional culture code for locale-aware text parsing (e.g., "en-US").

Return Value

dateThe date converted from the given value.

Remarks

Date.From converts text, datetime, datetimezone, or number values into a date. Text values are parsed according to standard date formats or the specified culture. Number values are interpreted as OLE Automation dates (days since December 30, 1899). If the input is null, the function returns null.

Examples

Example 1: Convert text dates to date values

Table.TransformColumns(
    Table.SelectColumns(
        Table.FirstN(Employees, 3),
        {"FullName", "HireDate"}
    ),
    {{"HireDate", each Date.From(_), type date}}
)
Result
FullName
HireDate
1John Smith3/15/2021
2Sara Johnson7/1/2019
3Mike Davis1/10/2022

Example 2: Convert a text string to a date

#table(
    type table [Result = date],
    {{Date.From("2024-06-15")}}
)
Result
Result
16/15/2024

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks