calculate the total hour time from 1440 munutes
I must calculate from a number that part from 0 and it reach 1440 es:
1440 minutes they is equivalent to 24 hour
75 miutes they is equivalent to 1 hour and 15 minutes
I wanted to have two counters...
--one counters what it only count the hours from a number that it reaches 1440
--the second counter count the minutes, always from the number that it goes from 0 to 1440, and it visualizes these numbers in minutes 0-60
ex:
variable A is 190
variable B (hours) is: 3
variable C (Minutes) is: 10
total time is 03:10
190 minutes is time 03:10
do you know how I am to calculate this precise time from the total minutes of one day?
sorry for my english...
Re: calculate the total hour time from 1440 munutes
For hours divide the number by 60
Code:
ex: 60m/60m=1hr
120m/60m=2hr
180m/60m=3hr
...etc
Re: calculate the total hour time from 1440 munute
^
| That way wont give the right result.
|
minutes to minutes and hours:
hours:
(minutes-(minutes mod 60))/60
minutes:
minutes mod 60
Re: calculate the total hour time from 1440 munute
Re: calculate the total hour time from 1440 munute
mod is a function in mmf which gives you the remainder of one number divided by the other.
eg.
10 mod 2 = 0 (10 / 2 = 5, 0 remainder)
11 mod 2 = 1 (11 / 2 = 5, 1 remainder)
Re: calculate the total hour time from 1440 munute
is their a list of all of the expressions explanations somewhere?
Re: calculate the total hour time from 1440 munute
The MMF help (F1) should have them.
Re: calculate the total hour time from 1440 munute
wat catogory would they be under?
also is there an online version of it?
Re: calculate the total hour time from 1440 munutes
Quote:
Originally Posted by DarkeSoft
For hours divide the number by 60
Code:
ex: 60m/60m=1hr
120m/60m=2hr
180m/60m=3hr
...etc
This is an easy solution.
if I divide a number for example: 190 and divide this number for 60. will appear a decimal number: 190/60= 3.16 hour
I have to eliminate the decimal number because I need an entire number: 3 hours instead of 3.16
easy example:
120 minutes= 2 hour and 0 minutes
in the "var Hour" add to value "2"
in the "var minutes" add to value "0"
hour total 02:00
hard example:
950 minutes= 15,83 hour
in the "var Hour" add to value "15"
in the "var minutes" add to value "50"
hour total 15:50
Re: calculate the total hour time from 1440 munutes
ok, It work, thanks SEELE!
I have used this solution WITH GLOBAL VALUE, not minutes
FOR HOURS: (value( "TIMETOTAL" )-(value( "TIMETOTAL" ) mod 60))/60
FOR MINUTES: value( "TIMETOTAL" ) mod 60
Regards
Re: calculate the total hour time from 1440 munutes