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
Post a Comment