Forum Discussion
Anonymous
5 years agoNot applicable
We cannot apply operator - to types Function and Date
Hi all... I am trying to find the difference, in days, from today's date and a Report date. If the difference is greater than or equal to 60 days, produce a 1, else a 0. I am receiving a "We cann...
- 5 years ago
Please try this instead
each if Duration.TotalDays(Date.From(DateTime.LocalNow()) - [Date]) <=60 then 1 else 0
Pat
mahoneypat
5 years agoMicrosoft Employee
Please try this instead
each if Duration.TotalDays(Date.From(DateTime.LocalNow()) - [Date]) <=60 then 1 else 0
Pat
Anonymous
5 years agoNot applicable
Great. Thank you! Looks like that converts the DateTime format to date at which point it can be compared to my Report Date column.