-
simhcAsked on April 17, 2016 at 11:37 PM
I cant seem to find a way to create a formula that will calculate how many days left in the month. I want to use that number to calculate a prorated amount. thanks for your help.
-
jonathanReplied on April 18, 2016 at 1:22 AM
I cannot find a function that gives the number of Days of a Month -- so you will need to either assume a fixed 30/31 days and calculate
OR
Get first the Month's number of days (example: April is 30days) and just substract the current date (number of days up to date) -- this will give the remaining days of the month
I will try create a demo form you can check. I'll get back to you shortly.
-
jonathanReplied on April 18, 2016 at 2:29 AM
Please test my form https://form.jotform.com/61081009373954
It work like this
Hope this help. Let us know how it goes.
-
simhcReplied on April 18, 2016 at 2:26 PM
Thanks for the quick responses and example form. Ideally I would like to have the end date calculated automatically. I played around with some temp forms and tried to set some conditions to do this. I tried to create a condition for each month...say if today is before May 1 or after Mar 30 then set the {end date} to 30 april and set the {number of days in the month} to 30. I could then use that info to subtract how many days are left in the month and do a calculation to find the percentage of the month remaining to determine a prorated charge. I cant seem to get that initial logic (calculating the end date) to work. any ideas? thx.
-
simhcReplied on April 18, 2016 at 2:29 PM
Thanks so much randy. That is exactly what I wanted. I will play with it and see if I can get that to do what I need. Disregard my last message that was not meant for you.
-
MikeReplied on April 18, 2016 at 4:28 PM
What a beautiful example! We appreciate your input, Randy.
-
simhcReplied on April 18, 2016 at 7:15 PM
Randy, the form you created worked perfectly. It provides all the information I need to do the prorated calculations. Thank you so much for taking your time to help me out. I had spent hours trying to get that to work. You even accounted for leap year…I’m impressed! Thanks again to everyone that helped answer my question.