1 (edited by Destiny 2022-06-27 18:19:26)

Topic: Hour and minute

Goodnight all. Just a quick question, how to calculate hours and half hours to add up hourly rates.

Destiny

Re: Hour and minute

Hi,
Not quite sure exactly what you want.
Can you give some examples of the calculation and how you want the result to show?
Derek.

3 (edited by Destiny 2022-06-28 08:23:32)

Re: Hour and minute

Hello Derek, I would like to calculate hourly rates but I don't know how to do for half hours.
When I count by hours everything is fine but the half-hours are more complicated. (view the photo).
Here is the code I use to calculate the hours
"Customers.Edit6.Value := ((Customers.cfTotalHours.Value * Customers.Tarif.Value));"
-
Bonjour Derek, je voudrais calculer des tarifs horaires mais je ne sais pas comment faire pour les demi-heures.
Quand je compte par heures tout va bien mais les les demi-heures c'est plus compliqué. (voir photo).
Voici le code que j'utilise pour calculer les heures
"Clients.Edit6.Value := ((Clients.cfTotalHeures.Value * Clients.Tarif.Value));"

Post's attachments

Attachment icon Dates et tarifs.jpg 52.28 kb, 64 downloads since 2022-06-28 

Destiny

4 (edited by sparrow 2022-06-28 13:09:34)

Re: Hour and minute

Hi Destiny, hi Derek

See example.

Post's attachments

Attachment icon hours.zip 334.17 kb, 130 downloads since 2022-06-28 

5 (edited by Destiny 2022-06-28 13:52:59)

Re: Hour and minute

Hello Sparrow, your example works well, I will adapt it to my program. I would have liked to type the numbers in the boxes myself, is it possible?

Destiny

6 (edited by sparrow 2022-06-28 14:06:04)

Re: Hour and minute

You need to pay attention to the rounding of the result by money and correct for rounding up or down.


In my example, I do not limit you in entering values in the fields.
What do you mean by "I would have liked to type the numbers in the boxes myself, is it possible?"


If something is not working for you, attach an example and we will try to help you.
Just please describe exactly what you need and what the result should be. What you see in your head is not available to us)))

7 (edited by Destiny 2022-06-28 14:19:08)

Re: Hour and minute

Here is an example of the program, what is missing is to be able to calculate the minutes.

Post's attachments

Attachment icon Planning de travail.zip 341.37 kb, 124 downloads since 2022-06-28 

Destiny

Re: Hour and minute

Hi Destiny, Sparrow,
The calculation itself is relatively straightforward. 
But I don't understand the approach you are taking with your data structure.
What happens when a client has more than 12 days/hours?
Derek.

9 (edited by Destiny 2022-06-29 05:20:40)

Re: Hour and minute

Hi Derek, I have several activities including this one which is limited and largely sufficient for my schedule and which does not exceed the hours indicated.

Destiny

Re: Hour and minute

Hi Derek, Destiny


Destiny , maybe so?


Derek, I would also change the base structure.
And work over time is not so simple) but interesting. Especially display the sum of minutes and hours )

Post's attachments

Attachment icon Plan1.zip 341.86 kb, 141 downloads since 2022-06-29 

Re: Hour and minute

Hi sparrow, your example is great, that's exactly what I need. Well done and thank you.
Destiny

Destiny

12 (edited by sparrow 2022-06-30 21:17:12)

Re: Hour and minute

Destiny, What if we change it a bit?

Post's attachments

Attachment icon Plan2.zip 338.1 kb, 128 downloads since 2022-06-30 

13 (edited by Destiny 2022-07-01 09:46:33)

Re: Hour and minute

Hi sparrow, your second approach is also good when you want to work directly on a board, I keep the one you offered me previously because it's the one that suits me best. Thanks

Post's attachments

Attachment icon Exemple.jpg 143.08 kb, 58 downloads since 2022-07-01 

Destiny