Minutes(Integer) conversion to Hours(Float) in HH.MM format in SQL Server 2008 -


how convert minutes (integer) values in hours float (hh.mm) in sql server 2008. example 398 minutes converted 6.38 hours, 419 minutes converted 6.59 hours etc.

please try:

select 398 / 60 + (398 % 60) / 100.0 select 419 / 60 + (419 % 60) / 100.0 

specific

select convert(numeric(18, 2), 398 / 60 + (398 % 60) / 100.0) select convert(numeric(18, 2), 419 / 60 + (419 % 60) / 100.0) 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -