Multiplicar horas y minutos hh:mm

buen día para todos
estoy tratando de multiplicar este ejercicio
como se puede ver esta en formato hh:mm

image

algún ejemplo para guiarme
saludos

Hi Elmachi.

Just like in real life when you try to multiply decimals, you can implement the concept into App Inventor.

  1. Multiply the MM part with the multiplicand "6".

  2. Since you have to keep the number in base 60, you can divide the MM part by 60. You keep the remainder as the MM part.

  3. Multiply the HH part with the multiplicand "6", and add the quotient you got just now to the product.

Of course, since your example is in HH:MM, to get the values of HH and MM, you split the string into a list of two items. You also want to keep it in leading zeros format.

This is the structure of my app here, and below are the blocks. In case if you have difficulty finding the right blocks, I have also provided an AIA file for you to copy them to your project.

image

TimeMultiplication.aia (3.0 KB)

Hope this helps.

1 Like

exelente

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.