Make three text layers with a slider on each. Call the layers value 1, value 2, and value 3.
In the source text of each of the text layers put this expression, to display the slider value and round it to the nearest minute:
slider = (effect("Slider Control")("Slider").value);
rounding = (Math.round(slider));
SourceText = rounding + " minutes"
Make a text layer called total.
Put the following in its source text as an expression
totalmins = thisComp.layer("value 1").effect("Slider Control")("Slider") + thisComp.layer("value 2").effect("Slider Control")("Slider") + thisComp.layer("value 3").effect("Slider Control")("Slider")
if (totalmins <60) {
SourceText = totalmins + " minutes" } else
if (totalmins > 61) {
SourceText = Math.round((totalmins/60)*10)/10 + " hours" }
else
"1 hour"
totalmins is a variable which adds up the total minutes from the sliders in the other layers.
If the total is under 60 minutes, it displays the total in minutes with the text " minutes" appended to it.
If the total is over 61 minutes, it displays the total time in hours, to one decimal place (the Math.round function normally rounds to the nearest whole number, so confusingly we have to multiply it by 10, then divide by 10 outside it to get one decimal place). Watch out for the capital letter on "Math".
Otherwise, display "1 hour".
