As it says above…
I don’t need the seconds with that as it does not constantly update.
I have searched around this site and google for a few hours and couldn’t find anything exactly like what I need.
Here is my code:
//Sets the percentage calculation
double percent = level / 100;
//Calculates the time left while using the following
double a = 40 * percent;
double b = 400 * percent;
double c = 7 * percent;
double d = 6 * percent;
aTime.text = [NSString stringWithFormat:@"%f", a];
bTime.text = [NSString stringWithFormat:@"%f", b];
cTime.text = [NSString stringWithFormat:@"%f", c];
dTime.text = [NSString stringWithFormat:@"%f", d];
After a calculation of, say, 50% of 7 hours, it currently gives 3.5 hours. I want it to say 3:30.
The calculations, as you can see, are static minus the level calculation, I just need to know how to convert the decimal to hh:mm (maybe even days for the 400 hours one).
Note: all the numbers above (40, 400, 7, 6) are in hours.
Example:
Output: