Calculate the number of days

  • Profile Image
    Asked on February 23, 2018 at 05:01 PM

    Hi again Richie,

    is there a way I can have a sort of add-on to help me calculating how many nights are selected?


    I have check-in date: 04.06.2018 and check-out date at 08.06.2018. It is 4 nights stay.

    Is there a widget that inserting a date for check-in and check-out automatically calculates me the nights?

    Thanks in advance.

  • Profile Image
    Answered on February 23, 2018 at 05:21 PM

    If you are using the date picker fields, that is possible using the update/calculation condition. Guide:


    There's also a widget that is designed for this purpose

    To get the date difference value, just use form calculation widget and add the date difference widget in the calculation wizard.

  • Profile Image
    Answered on February 23, 2018 at 05:49 PM

    Thank you so much Elton.

    Is it possible to see just the number without any other character?

    I show you how it shows.

    1519426090Schermata 2018-02-23 alle 23.4

    It says: difference: 2 days.

    I would like to see only the number 2 if possible.

    Thanks for your support!

  • Profile Image
    Answered on February 23, 2018 at 08:52 PM

    You should make sure that the date differences widget returns the difference only: 


    Once you have done this, you need to change the field included on the form calculation widget, click on it to include it as numeric value instead of text: 



    I hope this helps. 

  • Profile Image
    Answered on February 24, 2018 at 07:35 AM

    Thank you Kevin!

    I did it and it works perfectly!