Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Hours Subtraction

Hi there,   My formula (NETWORKDAYS("9/6/2020","30/06/2020", Holidays)-1)*10/24)+ TIME(18,0,0) - TIME(14:0:0))   Comes out at 6.416 on excel. When formatted to [h]:mm it displays as expected 154...
  • v-xicai's avatar
    6 years ago

    Hi Anonymous ,

     

    It seems that the a time expression with TIME function is unsupported to calculate in DATESBETWEEN function, since it's syntax is like  DATESBETWEEN(<dates>, <start_date>, <end_date>) , which only accepts a date expression for the second and third argument.

     

    CALCULATE(SUM(vwDimDate[WorkingDayFlag]), DATESBETWEEN(vwDimDate[Date],MAX('Room Utilisation'[New Start Date]),

              [ParameterEndDate]))-1 *10/24 + TIME(18,0,0) - MAX('Room Utilisation'[Start Time, ])

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.