Forum Discussion
Brett007
Helper III
6 years agoDuration between two dates
I would like to calculate the difference between Today's Date and the Date in the [Assigned Date] Column. I wanted to present the answer in the form of days. I used the following formula, but t...
- 6 years ago
Hi Brett007 ,
You could try below M code to see whether it work or not
Duration.Days(Duration.From(DateTime.Date(DateTime.LocalNow())-[Assigned Date]))Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
gpoggi
Responsive Resident
6 years agoHi there, assuming your [Assigned Date] is in DateTime format, you only have to add Duration.From to your code, so try something like:
Duration.Days(Duration.From(DateTime.FixedLocalNow()-[Assigned Date]))
And you should get what you need, please let me know if it works.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards,
Gian Carlo Poggi