Spent a few hours yesterday trying to create an expression to do a calculation.
Couldn’t get it and now my mind has shut down and I can’t think straight.
I want to do a calculation to determine the amount of rent that is due for a tenant to move in based on a prorated rate for the remainder of the month.
Does anyone have experience with this and know what the expression would look like?
Check this out: coaching-sandbox | Bubble Editor
Hope my math is right…
Prorated Rent = (rent / days in month) × days to occupy
3 Likes
First establish how many days there are in the month (i.e. for January there are 31)
Then establish how many days of rental there are in the month (e.g. if the rental starts on 20th Jan, then there are 12 rental days).
Divide the monthly rent by the number of days in the month (e.g. 2400 / 31 = 77.41)
Multiply the day-rate by the number of rental days (77.41 x 12 = 928.92)
2 Likes
I’m not in front of my computer right now but I came upon this older post with a way to calculate the number of days in a month:
1 Like
Yeah, as @romanmg already showed, the number of days in the month is just the Date of the last day of the current month.
i.e. Current Date/Time rounded down to month: plus months 1: plus days -1: extract date
2 Likes
Thank you so much for taking the time to do that.
It worked!!!
Also, thank you to everyone else that helped!!!
2 Likes