How to convert decimal type hour minutes to time type in SQL Server

I was working on a data warehouse project where the time data (HH:MM) were coming in decimal format from the source. Some of them were restricted to actual hour and minutes (23.59) and some were coming in real decimal format like (16.80). So I had a tough time dealing with the situation to make it standardised before storing into the warehouse and in time format. As usual I searched over on internet and did not find any good help, then I created my own function on basis of few calculation.

 

Prasad Sahoo

Prasad Sahoo, is an enthusiast of Microsoft technologies in general and a passionate database professional, mainly focusing on SQL Server performance tuning and business intelligence. He has contributed a long time of his career working on SQL Server and other RDBMS. If he is not busy with SQL stuff then he must be watching some Hollywood movies.

Leave a Reply

%d bloggers like this: