No, type TIME
was created to indicate a specific point in the timeline, not to indicate intervals of time that is what you want. This requirement "needs to convert this value (39.3716) to TIME format" part of a wrong premise, it's like wanting to measure how much milk you have in meters.
The correct way to store a time interval is to place the unit amount of time. Probably the most appropriate is the number of seconds, but can be more or less accurate, as long as you know what it is always, it can be only minutes, for example.
.NET has a more specialized type that best handles this for you Timespan
. Unfortunately the databases do not usually have a type like this, so you need to control that at hand.
Storing is different from submitting. Many people do not understand this. You can present as you want, you can even take that unit of time contained in the range and present as if it were a time. This is wrong. To say that "the duration is 39 hours and 50 minutes" is correct, to say "the duration is 39:50" is not, this notation is schedule and not elapsed time, but if you want you can do it, of course. You have a question that talks about this .
Either way, how long the calculations take is the correct time is to store it as a number and not as a text. I would go from BIGINT
or equivalent in your SGDB to save seconds elapsed in this range. For the presentation I would create functions that do the conversion, something similar can be seen in link above, would just adapt.
I know, you'll probably want to insist that the way you're thinking is fine, but it's not the right one. People learn wrong and work with error for so long that it gets even hard to understand and assimilate the right thing.
I'm glad that TIME
does not accept the value you want, if I accepted, I would probably use it wrong without realizing it, falling into what I always say:
Other than this I can not imagine why 39.37 is the same as 39 hours and 50 minutes. .37
is slightly above 1/3, so it should be little more than 20 minutes when we talk about an hour.