Notifications
Clear all
Power Query
4
Posts
2
Users
0
Reactions
87
Views
Topic starter
Hi, I'm adding a Custom Column called Age to a query, using this formula:
= DateTime.LocalNow() - [Install Date]
[Install Date] is a column of dates, formatted as Date.
I want to calculate the age of equipment. I've tried formatting the custom column as Date and Whole Number, but I only get an error with both.
What am I doing wrong? TIA, Paul
Posted : 01/02/2022 12:08 pm
Topic starter
For the benefit of anyone looking for a solution, the following formula gives me the days' duration, formatted as Whole Numbers:
= Date.From(DateTime.LocalNow()) - [Install Date]
I'm looking for a way to format, either as months, or years and months. If I can't do it in PQ, it's easy enough in Excel...
Posted : 01/02/2022 12:22 pm
Topic starter
And now I see that there's a built-in Calculation for this on the Add Column tab... 🙂
Posted : 01/02/2022 12:36 pm
🙂
Posted : 02/02/2022 12:33 am