Hi I'm trying to make a program, which can calculate in minuts and hours.
If I have the time 1140 and add 40 min. so It should tell me that the time = 1220, and not 1180.
Dows anyone have a good idea how to make this work properly.
Tx
Hi I'm trying to make a program, which can calculate in minuts and hours.
If I have the time 1140 and add 40 min. so It should tell me that the time = 1220, and not 1180.
Dows anyone have a good idea how to make this work properly.
Tx
!G!
> If I have the time 1140
Split hours and minutes and calculate the time in minutes only
m = 11 * 60 + 40
Then add 40 to it
Then convert back to hr:mm like so
hr = m / 60;
min= m % 60;