I want to convert the float time field 8.07
to string 08:07
. Is there any easy way to do this?
Or Should I split it by dot, calculate the length and append zero accordingly?
What about this:
DECLARE @value DECIMAL(9,2) = 8.07
SELECT REPLACE(RIGHT(@value + 1000000, 5), '.', ':');
Of course you can change the value you are adding to something small.