Forum Discussion
TIGER8855
3 years agoHelper I
exclude text values when using DATEDIFF
I'm using DATEDIFF to find the number of days between today and dates in column however the column also has some values that are text therefore the the calculation doesn't work. Can anyone advise...
- 3 years ago
Hey TIGER8855
you can do this with two steps in Power Query, create a new column with this code
try Date.FromText ([maybe a Date] )
otherwise null
Then change the data type to Date
This result might look like this:Hopefully this provides what you are looking for.
Regards,
Tom
TomMartens
3 years agoSuper User
Hey TIGER8855
you can do this with two steps in Power Query, create a new column with this code
try Date.FromText ([maybe a Date] )
otherwise null
Then change the data type to Date
This result might look like this:
Hopefully this provides what you are looking for.
Regards,
Tom
TIGER8855
3 years agoHelper I
Thanks TomMartens. That works. My original DATEDIFF can now be used on this new column.