cancel
Showing results for
Did you mean:
Frequent Visitor

## how to sum time in h:m time format

Hi all,

Im new to powerapps, and making a simple app to calculate time.

looking for help to calculate time (0:15 + 0:4 = 0:21)

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Most Valuable Professional

You did not mention needing hours in the equation - both your examples were minutes only (hence my response)

With(
{
wMinutes:
Value(
Last(
Split(
YourTime1.Text,
":"
)
).Value
) +
Value(
Last(
Split(
YourTime2.Text,
":"
)
).Value
),
wHours:
Value(
First(
Split(
YourTime1.Text,
":"
)
).Value
) +
Value(
First(
Split(
YourTime2.Text,
":"
)
).Value
)
},
wHours +
RoundDown(
wMinutes / 60,
0
) & ":" &
Mod(
wMinutes,
60
)
)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

MVP (Business Applications)   Visit my blog Practical Power Apps

5 REPLIES 5
Frequent Visitor

Correction, sum **hour and minutes**

Most Valuable Professional

Hi @Shikaka ,

Apart from 15 + 4 equalling 19, you would do this

With(
{
wTime:
Value(
Last(
Split(
YourTime1,
":"
)
).Value
) +
Value(
Last(
Split(
YourTime2,
":"
)
).Value
)
},
RoundDown(
wTime / 60,
0
) & ":" &
Mod(
wTime,
60
)
)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

MVP (Business Applications)   Visit my blog Practical Power Apps

Frequent Visitor

Thank you so much @WarrenBelz

Partially it worked, but it does not reflect the hours for example:

1:5 + 1:25 = shows 0:30

which im looking for 2:30

Thanks

Most Valuable Professional

You did not mention needing hours in the equation - both your examples were minutes only (hence my response)

With(
{
wMinutes:
Value(
Last(
Split(
YourTime1.Text,
":"
)
).Value
) +
Value(
Last(
Split(
YourTime2.Text,
":"
)
).Value
),
wHours:
Value(
First(
Split(
YourTime1.Text,
":"
)
).Value
) +
Value(
First(
Split(
YourTime2.Text,
":"
)
).Value
)
},
wHours +
RoundDown(
wMinutes / 60,
0
) & ":" &
Mod(
wMinutes,
60
)
)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

MVP (Business Applications)   Visit my blog Practical Power Apps

Frequent Visitor

Thank you so much, it worked 🙂

Announcements

#### Celebrating the May Super User of the Month: Laurens Martens

@LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!