-
evensbelizaireDemandé le 28 juin 2023 à 02:34
-
Angeli Jotform SupportRépondu le 28 juin 2023 à 03:04
Hi evensbelizaire,
Thanks for patiently waiting. Yes, this is possible. You can subtract one Date Picker field from another to get the difference. I'll walk you through setting that up:
- Add a Form Calculation widget and Subtract the DateOut to DateIn.
- The results will be in decimal so you'd need to add another Form Calculation widget to get the absolute result.
- Add the Floor formula by clicking the 3 dots icon and put the Raw Date difference between the open and close parenthesis.
Now, to get the time, we'll add 3 Form Calculation widgets. Here's the formula:
- Subtract the Raw Date difference to its rounded result then multiply it by 24.
- Add the Floor formula and the result in the Raw Hours and Minutes to get the Hours.
- And copy the formula below to get the Minutes.
You can clone this demo form to inspect or test. We also have a guide about Performing Date and Time Calculations that you can check out.
Give it a try and let us know if you need any help.
-
evensbelizaireRépondu le 28 juin 2023 à 20:50
Bonjour Angeli
Merci pour les formules, elles fonctionnent très bien!.
Mais j'aimerais avoir le résultat en heure et en minutes seulement (pas de jour),
J'ai utilisé cette formule
Mai on dirait qu'il manque quelque chose. Peux-tu vérifier svp
Hello Angeli
Thanks for the formulas, they work very well.
But I would like to have the result in hours and minutes only (not days),
I used this formula
(capture)
But it looks like something is missing. Can you please check please
-
Ravi Jotform SupportRépondu le 29 juin 2023 à 03:22
Hi evensbelizaire,
Thanks for getting back to us. In that case you need to update the calculation for Hours Field. Your updated calculation for Hour Field will look like the below screenshot :
I have made changes in the cloned form. Here is the link to the clone form. If needed you can clone my form to check the calculation in widgets. We also have a guide on How to Clone an Existing Form From a URL that you can check out.
Reach out again if you need any other help.