calculating months and days from check in and check out date

By: Brian Thornton | Asked: 07/19/2023
ForumsCategory: How-tocalculating months and days from check in and check out date
Brian Thornton asked 9 months ago
I was able to determine the number of dates between two date fields. However, I am trying to formulate a total rent amount that would be based on a fixed monthly rate and adding any pro rated amount (or daily rate) for the odd number of days that follow (if any).   Example: monthly rate = $100.  Daily rate = $3.30 (100 / 30.33)  Check-in date: 1/1/23 Check-out date: 3/10/23 Total = $233  ($100 Jan. +$100 Feb.) + 3.30 X 10 days Mar.   The math does not work out correctly If simply provide a daily rate and multiply by total number of days.   

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right