생산성을 계산해야합니다. 나는 시간이 걸릴 경우시간 (분) 또는시와 분 및 분 SQL Server
Productivity = some count/ no of Hrs
나는 1 hrs 30 minutes
생산성
Productivity = some count/1.3?
또는
Productivity = some count/1.5?
생산성을 계산해야합니다. 나는 시간이 걸릴 경우시간 (분) 또는시와 분 및 분 SQL Server
Productivity = some count/ no of Hrs
나는 1 hrs 30 minutes
생산성
Productivity = some count/1.3?
또는
Productivity = some count/1.5?
될 것입니다 예를 들어 HH:MM
의 시간이 1 시간 30 분이면 1.5 시간입니다. @Time
이 작업이 소요 된 시간이다 이런
SELECT DATEPART(HOUR, @yourTime) + (DATEPART(MINUTE, @yourTime)/60.) AS pHours;
이상 완전히 뭔가 : 당신은 가능성이 뭔가를 원할 것 units/Hour
에서 생산성을 얻을 수 yourValue/1.5
: 당신은 당신의 계산을 할 것
SELECT @workAccomplished/
(DATEPART(HOUR, @Time) + (DATEPART(MINUTE, @Time)/60.)) AS Productivity;
1.3으로 나누면 0.3 시간 = 18 분으로 1 시간 18 분이됩니다.
declare @workaccomplished int = 240
declare @timeworked int = (SELECT DATEDIFF(hour, '2007-05-07 09:53:01', '2007-05-08 09:53:01'))
--datediff parameters: hour, startingtime , endtime
declare @productivity numeric(8,4) = @workaccomplished/@timeworked
select @productivity
현재 접근 방식이 작동하지 않습니다. 'Datediff (hour,) '가 반올림되므로 분을 분수로 변환하지 않습니다. 이렇게하면 계산이 중단됩니다. –
@Adam Wenger 죄송합니다. 분 비트를 잊어 버린 경우 : \ –
1 시간 30 분은 1.5 시간이다. – Kevin