Hello!
So I am calculating the time between 2 times using 4 dropdown boxes. The time is being displayed like this:
https://gyazo.com/c85df24cfc1d1b80e6c0372d8a9a5fac
I then have another dropdown box where they can select the pause they had. This will be in minutes (15, 30, 45, 60)
I then want to calculate the tijd totaal - the pause in minutes
How could I do this?
Code Tijd totaal:
DateDiff(Time(
Value(DropBeginUur.Selected.Value),
Value(DropBeginMinuten.Selected.Value),
0),Time(
Value(DropEindUur.Selected.Value),
Value(DropEindMinuten.Selected.Value),
0),Minutes) / 60.0
The dropdown for pause is named DropPause
Solved! Go to Solution.
Hi @Anonymous ,
Please try this:
(DateDiff(Time(
Value(DropBeginUur.Selected.Value),
Value(DropBeginMinuten.Selected.Value),
0),Time(
Value(DropEindUur.Selected.Value),
Value(DropEindMinuten.Selected.Value),
0),Minutes)-Pause.Selected.Value) / 60.0
Pause.Selected.Value means the pause minutes you selected from pause dropdown.
Sik
@Anonymous
You would seem to have a valid formula. What has gone wrong? Please provide an example of what you input, what the output was, and what the answer should be.
Why did you divide by 60 at the end of the formula? You can control the 'Units' in the 3rd argument of DATEDIFF so this seems unnecessary.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I did not make that code myself but it basically calculates the time between 4 dropdownboxes. This code works totally fine. Here is an example: https://gyazo.com/ae308ba31c8fb5e89a6e27bd6e44b526
Now I want to have another textfield that calculates the time - the pause.
Now for an example I have added another dropdownbox that is named pause. So I need to add another textfield where the time - the pause is stated.
Now the total time = 7.25 which is equal to 7 hours and 15 minutes. The pause dropdown box is 30 minutes, so the time in the new textfield should be: 6.75
I hope this made it more clear. @mdevaney
Anyone able to help me?
Hi @Anonymous ,
Please try this:
(DateDiff(Time(
Value(DropBeginUur.Selected.Value),
Value(DropBeginMinuten.Selected.Value),
0),Time(
Value(DropEindUur.Selected.Value),
Value(DropEindMinuten.Selected.Value),
0),Minutes)-Pause.Selected.Value) / 60.0
Pause.Selected.Value means the pause minutes you selected from pause dropdown.
Sik
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
186 | |
52 | |
50 | |
34 | |
33 |
User | Count |
---|---|
266 | |
97 | |
84 | |
72 | |
71 |