I have a decimal. The range of this decimal is between 0 and 23.999999. This decimal represents a time. For example, if the decimal is 0.25, then the time it represents is 1
Well, here's an answer in C#, but it's generally the same idea in most languages:
int hours = (int)hoursDecimal; decimal minutesDecimal = ((hoursDecimal - hours) * 60); int minutes = (int)minutesDecimal; int seconds = (int)((minutesDecimal - minutes) * 60);