cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Maurice_M
Level: Powered On

Add Up dropdown time values

Hi,

 

I want to collect working hours in a mobile app and now I need to add up my start and end time and to subtract my break minutes. How can I count the values and show it as data type time in a Label?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Add Up dropdown time values

Hi @Maurice_M ,

How do you record your Start time and End time in your app?

 

I assume that you have gotten the Start time, End time and break minutes, lease consider take a try with the following workaround:

Set the Text property of the Label to following:

RoundDown(
(First(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result -
First(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result -
'Specific Break Minutes')/60,
0
) & ":" &
(First(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result -
First(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result -
'Specific Break Minutes') - 60 *
RoundDown(
(First(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(EndTime, "[$-en-US]hh:mm"), ":")).Result -
First(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result * 60 + Last(Split(Text(StartTime, "[$-en-US]hh:mm"), ":")).Result -
'Specific Break Minutes')/60,
0
)

The result above formula returned would be displayed as below:

17:51     /* <-- HH:mm format */

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Maurice_M
Level: Powered On

Re: Add Up dropdown time values

Hi @v-xida-msft,

thanks for ur nice Idea but its not working, when I found the Solution i will tell it here.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 443 members 6,591 guests
Please welcome our newest community members: