-
artemixrojoPerguntado em 4 de abril de 2024 às 08:21
Bom Dia
Preciso criar uma formula que traga o seguinte?
Tenho a data de Check-in e a Data de Check-out
Tambem criarei um campo para somar os dias de cada mes - TotJan, TotFev, etc...
Preciso que esses campo calculem a quantidade de dias de um mes no intervalo das datas de Check-in e Check-Out
Exemplo:
Check-in - 20/01/2024
Check-Out - 15/02/2024
Logo
TotJan = 11 dias
TotFev = 14 dias
É possivel?
-
Jefferson Jotform SupportRespondido em 4 de abril de 2024 às 13:45
Hi Artemio,
Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Portuguese, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.
Now, let me help you with your question. I understand you would like to calculate the number of days per month based on the check-in and check-out dates. Unfortunately, it's not possible to get the total number of days per month. The only workaround is to calculate the number of days for the two dates directly. Let me show you how:
- In Form Builder, click the Add Form Element button and add two date pickers and one number element to your form.
Next, we need to add a condition to calculate the number of days for two dates:
- In Form Builder, click on the Settings tab in the orange navigation bar at the top of the page.
- Click on the Conditions tab on the left side of the page and click on Add Condition.
- Select the Update/Calculate Field and select the following details:
- IF: Check In
- STATE: Is Filled
- Click the plus button to add another rule.
- IF: Check Out
- STATE: Is Filled
- Set the Rules Matched as All.
- DO: Calculate Field Value
- Click the Add Field button and select the Checkout date.
- Add a minus symbol after the Checkout date.
- Click the Add Field button and select the Checkin date.
- Hit on Save to update changes in your Condition.
That's it! Test your form, and you should see that it displays the number of days based on selected dates. Check out my screencast below:
Give it a try and let us know how it goes.
- In Form Builder, click the Add Form Element button and add two date pickers and one number element to your form.