Forum Discussion

AI14's avatar
AI14
Icon for Helper III rankHelper III
3 years ago
Solved

formula to count live time

Hi

 

i want to count the number of hours from start of shift till end of shift live.

 

for example:

#Scheduled start

Scheduled End

105:30

14:00

206:0014:30
306:3015:00
407:00

16:00

 

If the time was 10:00am then the count needs to be:

1: 4.5

2: 4

3: 3.5

4: 3

 

i tried using the below formula however i cant add my scheduled start column. any sugguesions 

Hrs from Shift = FORMAT( NOW() - xxxxxxxxx, "H")
 
also is there a way to count each hour until the schedule end time. so it should be a total of 8.5 hours based on shift length.
 
KR,
AI
  • HI AI14 
    Please try

    Hrs from Shift =
    DATEDIFF (
        TIMEVALUE ( 'Table'[Scheduled star] ),
        MIN ( TIMEVALUE ( 'Table'[Scheduled end] ), TIMEVALUE ( NOW () ) ),
        MINUTE
    ) / 60

1 Reply

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    HI AI14 
    Please try

    Hrs from Shift =
    DATEDIFF (
        TIMEVALUE ( 'Table'[Scheduled star] ),
        MIN ( TIMEVALUE ( 'Table'[Scheduled end] ), TIMEVALUE ( NOW () ) ),
        MINUTE
    ) / 60