Hello!
I am working on a custom form for a SPO list in PowerApps, in which I have a Start Date and an End Date with a date picker and an hour picker. What I am trying to achieve is, once the user inputs the date and hour of both of them, return the Hours per day in one field and the Total hours per day of those days in that range of hours selected in another field.
Im trying this formula for the Hours per day (syntax is in spanish) :
Value(DateDiff(Value((InicioDate.SelectedDate) + Time(Value(InicioHour.Selected.Value);Value(InicioMinute.Selected.Value);0));
Value((DateValue2.SelectedDate) + Time(Value(HourValue2.Selected.Value);Value(MinuteValue2.Selected.Value);0));TimeUnit.Minutes) / 60)
When I select the hour range in the same day, it returns the correct value:
But when I select different dates, it returns the total hours of those days, when I only need the range between the hours selected:
Any idea on how can I achieve getting the Hours per day and the Total hours per day in that range of hours?

Report
All responses (
Answers (