Calculate how many days till contract expire #
Customer is using M-Files for contracts and document management. He would like to know how many days until the expiration of the contract (Picture 1). Customer has used “DATEDIFF” macro in Macros.
![](https://mfilesproducts.wpengine.com/wp-content/uploads/2022/04/1-878x1024.png)
In Picture 2, we can see that Property „Expiring (days)“ has been populated.
![](https://mfilesproducts.wpengine.com/wp-content/uploads/2022/04/2-878x1024.png)
Configuring Auto properties #
![auto properties configuration](https://mfilesproducts.wpengine.com/wp-content/uploads/2022/04/3-1024x480.png)
Track working days and non-working days when employee takes vacation #
Customer wants to track all working days in vacation period of employees.
We created Object type = Vacation in our M-Files Vault and added class Vacation Application. We used it for logging the days someone is out of office for more than one day.
Also we created a property Working days in which we want to calculate working days between start and end day of vacation. In addition, you can add what days are non-working, for precise calculation.
![calculate working days with auto properties](https://mfilesproducts.wpengine.com/wp-content/uploads/2022/04/4.png)
Also, you can define that the system stops calculating holidays as working days, or simply choose the holiday that you don’t want to calculate.
![auto properties feature exclude or include holidays](https://mfilesproducts.wpengine.com/wp-content/uploads/2022/04/5.png)
Picture 5. Exclude holidays