Decimal Hour into Time?

asp.net, c#

Solution

`TimeSpan.FromHours`:

double value;
TimeSpan t = TimeSpan.FromHours(value);

Example:

Console.WriteLine(TimeSpan.FromHours(1.4)); // prints 01:24:00 to the console.

Problem

I have an hour field in a database like 1.4, 1.5, 1.7 that I need to convert back to HH:MM. What is the easiest way to do this?

Original source