Hello All,
I am working on a formula to show relevant currency £ calculations based on selected dates and times.
The Total formula needs to meet the following criteria:
- always calculate the remaining minutes in hourly rate
e.g. if you book for 30min then you pay for 1 hr or if booked for 1hr and 45min then you pay for 2 hrs and so on. - when fromDate and untilDate are equal AND the hourly differences between the dates is below 8 THEN calculate the hour difference * hourly rate (note: if the hourly difference is below 1 hr then total is always hourly rate)
- when fromDate and untilDate are not-equal THEN calculate the day difference by 8hrs PLUS any remaining hour difference between the times (for example 1 day and 5hr:30min = 1 day * 8 hrs + 6hrs)
Another example shown below the booking is taken place for 1 day, 5hrs and 15minutes.
The caculaculation in this case would be: (1 day * dailyRate) + 6hrs * 3.50 < unless I am being wrong.
Please feel free to through in your opinions and better efficient ways in achieving the outcome.
Maybe an introduction to using the FORM VIARIABLE may be beneficial of which I am new to.