You are using an integer division (in the line
totalHours = tmpcnt / 60000;
, both tmpcnt variable and 60000 constant are integers.
Thus, you get the integer division result.
If you want a real division, you should use double type for at least one of the operands.
For example:
totalHours = tmpcnt / 60000d;
totalHours = tmpcnt / 60000.0;
This will give you expected result.