Date.From
Converts a value such as a date and time, or text, to a date with no time part.
Date.From(value as any, optional culture as nullable text) as nullable dateReturns: The date, or null when the input is null.
What it does
Date.From turns a value into a plain date. The most common use is dropping the time part from a timestamp, so that a posting time of 14:32 on October 29 groups with every other posting on October 29. Text values are also converted, using the culture you pass or the machine's culture. For text from a bank or other outside source, Date.FromText with an explicit format is safer.
Syntax and arguments
- value: the date, datetime or text to convert.
- culture (optional): the culture used to read text, such as "en-US". It does not affect a date or datetime value.
Example
An ERP export records each journal entry with a date and time. The month-end report groups entries by day, so the time part is removed first.
let
Journal = #table(type table [Entry = text, Posted = datetime],
{{"JE-1001", #datetime(2026, 10, 29, 14, 32, 0)},
{"JE-1002", #datetime(2026, 10, 29, 16, 5, 0)},
{"JE-1003", #datetime(2026, 10, 30, 9, 10, 0)}}),
ByDay = Table.AddColumn(Journal, "PostingDate", each Date.From([Posted]), type date),
Grouped = Table.Group(ByDay, {"PostingDate"}, {{"Entries", each Table.RowCount(_), Int64.Type}})
in
Grouped
The two October 29 entries group into one row with an Entries count of 2, and October 30 has one entry. The time part no longer splits the day.
Example: a second, different use
Convert a date held as text in the ISO form, such as "2026-10-29", to a date value so it can be compared with other dates.
Things to watch
- Date.From on a datetime drops the time. Any comparison that needs the time must use the datetime, so keep both columns when a cutoff time matters.
- Text is read with the machine's culture unless you pass one. A text date such as "03/04/2026" can mean two different days.
- Time zones are not converted here. A timestamp stored in UTC keeps its UTC date.
- Null in gives null out.
In business terms
Journal entries, invoices and payments carry timestamps, but reports are by day or by period. Converting to a date first is how a daily summary and a month-end cut-off agree with each other.