Exploring Duration Options for Whole Numbers

The Duration option is designed to store time intervals or durations within the Dynamics 365 environment. It is particularly useful when you need to capture and manage time spans or periods related to various business processes. This data type enables you to handle durations in terms of hours, days, weeks, months, or even years.

This format option allows the display of a list containing various duration choices. However, the data stored in the database is always represented in the form of minutes. The field appears as a drop-down list, presenting suggested options such as 1 minute, 15 minutes, 30 minutes, and extending up to 3 days. Users have the flexibility to select these predefined options. Additionally, they can manually input a specific number of minutes, and the system will automatically interpret it as the corresponding duration. For instance, entering “60” will resolve to 1 hour, and inputting “1 hour” or “2 days” will display the respective times.

When entering durations, users must adhere to the following format: “x minutes,” “x hours,” or “x days.” Furthermore, it is possible to input hours and days with decimal values, for instance, “x.x hours” or “x.x days.”

Keep in mind that values entered must be expressible in minutes, as sub-minute values will be rounded to the nearest minute.

How to update the duration field using Power Automate

While Power Automate lacks a direct method for calculating date differences, you can still achieve it by utilizing expressions and specific functions. The following approach outlines how to calculate the duration between two dates, with the result conveniently stored in the duration field, expressed in minutes.

div(sub(ticks([DateTo]),ticks([DateFrom]),600000000)

Leave a comment