Power Fx function
DateValue — Power Fx function reference
Parse text into a date.
Syntax
powerfx
DateValue( DateText [, LanguageCode ] )
Examples
powerfx
DateValue("2026-06-13")→ A date
powerfx
DateValue("2026-06-13")powerfx
DateValue(txtDateInput.Text, "en-US")
Common mistakes & gotchas
- Parsing is locale-sensitive — "06/13/2026" parses fine under en-US but is ambiguous or wrong under locales expecting day/month order; pass LanguageCode explicitly for a fixed input format.
- An unparseable string returns an error, not blank — wrap with IfError when the input might be free-typed rather than from a DatePicker.
Related Power Fx functions
From Date & time