How can I calculate the number of days between two date fields?

How can I calculate the number of days between two date fields?

To calculate the number of days between two given date fields, for instance, ServiceStartDate and ServiceEndDate, add a formula field to the form with formula expression as below.


((ServiceEndDate - ServiceStartDate) / (1000 * 60 * 60 * 24))

,where ServiceStartDate & ServiceEndDate is the respective date fields.

    • Related Articles

    • How can I calculate the number of hours between two date and time fields?

      To calculate the number of hours between two date and time fields, add a formula field and specify the formula expression as ((To_Date - From_Date) / (1000 * 60 * 60))   form Sample { FromDate ( type = datetime ) ToDate ( type = datetime ) Hours ( ...
    • How can I add days to a date field?

      You can manipulate a date field by using the + (to add) and - (to subtract) Operators or by using the Built-in date functions. For example, if you would like to add 364 days to a particular date field, say StartDate and display it in another field, ...
    • Formula custom fields

      A formula field will automatically calculate and derives its value by referring to the value of the specified fields or the numeric, text, or date values given in the formula. You can customize fields with formulas using functions like numeric, ...
    • Creating Formula Fields

      Formula fields are used to calculate different types of values, including numeric values, text values, date values, etc. Formula fields and their resulting return value have certain data types associated with them and there are specific operators ...
    • Task layouts & fields

      Zoho Projects supports custom fields and layouts for tasks. Create your own fields and task layouts and use them for creating tasks as per your business requirements. Click here to learn more about access privileges for Custom Fields and Task ...