Background:
I have an array of integer times given as 0830 for 08:30, 1745 for 17:45, etc.
I need to calculate the time difference between times. So I'm first turning integer times into floating point times by dividing by 100.0. This means that 0830 will become 8.30.
int inTime = 0830, outTime = 1745;
float newIntime = inTime/100.0;
float newOutTime = outTime/100.0;
The next step, and this is my question, is: How do I divide the decimal part by 0.6 so I get 8.50. This is the only way I'll be able to subtract/add times and get the correct time difference in a meaningful format.
I have not been able to figure out (or look up) a way to multiply the decimal part, i.e. to "access" only what's on the right side of the decimal point. Any help will be appreciated!