Hello community,
I have a time calculation that doesn't work as I'd expect it to work:
I have a Start Date + Hour + Minutes and End Date + Hour + Minutes
I have this formula on a label at the bottom :
With(
{
days: RoundDown(DateDiff(dStart.SelectedDate, dEnd.SelectedDate, Hours) / 24, 0),
hours: Mod(RoundDown(DateDiff(Time(HourValue1.Selected.Value,0,0), Time(HourValue2.Selected.Value, 0,0), Minutes) / 60, 0), 24),
minutes: Mod(DateDiff(Time(HourValue1.Selected.Value,MinuteValue1.Selected.Value,0), Time( HourValue2.Selected.Value,MinuteValue2.Selected.Value,0), Minutes), 60)
},
days & " day(s), " & hours & " hour(s) and " & minutes & " minute(s)"
)
But its not calculating correctly:
Start Time:

End Time:

Result:

Can anyone tell me where I m going wrong with this?
Regards,