Forum Discussion
Anonymous
4 years agoNot applicable
Validate if value(String) is a date or not using M Language
Hi I am tryingto cretae this on the PawerQuery editor, use M Language, to evaluate if a value, or string if we can call it a string, is either valid date value or not. I was aiming to use a Cus...
- 4 years ago
Your function would look like:
try Date.FromText([DateColumn]) <> null otherwise false
- 4 years ago
You will need to use complete formula alongwith try to suppress the error. Don't omit try.....
=try Value.Is(Date.From([Date Field]), type date) otherwise false
If you want to convert it to date in a custom column
try Date.From([Date Field]) otherwise null
artemus
4 years agoMicrosoft Employee
Your function would look like:
try Date.FromText([DateColumn]) <> null otherwise false
- Anonymous4 years agoNot applicable
Hi
Did not work for my situation but handhy to have options, thanks.