cancel
Showing results for
Did you mean:  Post Prodigy

## Calculate with times

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

1 ACCEPTED SOLUTION

Accepted Solutions  Community Support

``````(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

4 REPLIES 4  Super User

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."  Post Prodigy

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  Post Prodigy

Anyone able to help me?  Community Support

``````(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   