Date.FromText Function in Power Query
The Date.FromText function in Power Query (M language) converts a text value into a date value. It is useful when you have date values stored as text and want to perform date calculations.
Syntax
Date.FromText( text as nullable text, optional options as any ) as nullable date
Example: Convert "2024-12-31"
into a date value.
Power Query M
let Source = Date.FromText("2024-12-31") in Source
The output of the above code is:
#date(2024, 12, 31)