Convert Minutes into Days, Hours, and Minutes Best Practices

Convert Minutes into Days, Hours, and Minutes: Best Practices


Convert Minutes into Days, Hours, and Minutes: Best Practices


In today’s data-driven environment, understanding time conversion is essential. This article explores the nuances of converting minutes into more digestible formats such as days, hours, and minutes. By doing so, we not only simplify data representation but also elevate the user experience.

Why Time Conversion Matters:

When dealing with timestamps or durations, it’s often challenging to visualize time when only presented in minutes. Hence, for better clarity and a more user-friendly approach, transitioning to formats like hours or days is beneficial.

Breaking Down the Basics:

To illustrate, let’s take the example of 93 minutes. With the application of a basic formula, we can easily depict this duration in hours and minutes.

     $"{RoundDown(inputVal/60)} hr {Mod(inputVal,60)} mins"

Surprisingly, this formula gives us an output of “1hr 33mins”. But what’s the logic behind this?

Diving Deeper: Understanding the Formula:

Primarily, the formula capitalizes on the RoundDown and Mod functions. The hours are calculated by dividing the total minutes by 60 and then rounding down. On the other hand, to determine the remaining minutes, the Mod function plays a crucial role.

Tackling the Challenge of Negative Inputs:

Negative values, such as -93 minutes, introduce a complexity. The standard formula might falter here. However, with a slight twist and the integration of the Abs function, we can address this challenge efficiently.

     $"{RoundDown(inputVal/60,0)} hr {Mod(Abs(inputVal),60)} mins"

As a result, the adjusted formula outputs “-1hr 33mins”.

Precision Enhancements:

Furthermore, to ensure our representation is impeccable, a few refinements to the formula are necessary. This includes catering to the plurality of the hour descriptor and ensuring a consistent two-digit minute format.

           $"{outputHour} hr{If(outputHour>1,"s")} {Text(outputMinute,"00")} mins"

Venturing Beyond Hours: Including Days:

For more substantial durations, simply representing hours and minutes isn’t sufficient. Thus, we expand our scope to include days for a comprehensive representation.

                   $"{outputDay} day 
                       {outputHour} hr{If(outputHour>1,"s")} 
                       {Text(outputMinute,"00")} mins"

Consequently, a duration like 1525 minutes translates to “1 day 1 hr 05 mins”.

Reference: With function in Power Apps


In wrapping things up, mastering time conversion is undeniably pivotal for clear data interpretation and an enriched user experience. By employing the methods and insights shared, data representation becomes both intuitive and user-centric. Additionally, our team remains available for any further clarifications or assistance.

If you want to learn more about the Power Apps, feel free to explore our other informative articles and tutorials.

Have additional inquiries? Our team is here to assist. Please don’t hesitate to reach out!

About The Author