I'm creating a fillable form for a customer who is trying to track "eligible" days in a given month. This is hospital related information, so the client wants to be able to have a field where they enter a date, example 04/02/2020 (date of admission) and then have a field at the bottom that automatically calculates the number of days left in the month (eligible days), as those admitted to this facility will receive this particular coverage until the end of the month. The date of admission also counts as an eligible date. I've tried a few codes, but everything that I know to do requires you to enter an "end date" so to speak and then calculates the days between. Is there something that will allow the field to pick up the month that's entered into the admission date field and then calculate the number of days left for that particular month...similar to how Excel works? The only other thing I know to do is to create an extra field so the last day of the month can be entered and then have the code in the Eligible Days field to calculate the difference +1 (to account for the day of admission).
If you are not familiar with this object, these tutorials are a good place to start learning about it: