Forum Discussion
JesseV
4 years agoFrequent Visitor
Replacevalue after comparing date type collumn value with current date
Good afternoone everyone Me (a noobie to PowerBI) would like to add a powerquery step to the following example data: Resultaatteken Geldig tm X 25/02/2020 @ null X 22/10/2030...
- 4 years ago
Hi JesseV ,
You can try to use DateTime.Date function.
= Table.ReplaceValue(#"Changed Type with Locale", each [Resultaatteken], DateTime.Date(DateTime.LocalNow()),Replacer.ReplaceValue,{ "Resultaatteken"})Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JesseV
4 years agoFrequent Visitor
So through the magic of reading the manual I have discored that I was missing as datetime after DateTime.LocalNow()
= Table.ReplaceValue(#"Volgorde van kolommen gewijzigd1", each [Resultaattekenz], DateTime.LocalNow() as datetime ,Replacer.ReplaceValue,{ "Resultaattekenz"})
Which just leaves me wondering how I can convert it to just the date value ('as date' unfortunately didn't take.. which seems a little odd to me)
- Icey4 years ago
Community Support
Hi JesseV ,
You can try to use DateTime.Date function.
= Table.ReplaceValue(#"Changed Type with Locale", each [Resultaatteken], DateTime.Date(DateTime.LocalNow()),Replacer.ReplaceValue,{ "Resultaatteken"})Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.