Jump to content
  • 0

Calculating days between two events/submissions in Report



I have a table for Case Notes/Incidents, and I need to somehow build a report that includes a calculation for the days between the last /previous casenote/incident and the subsequent casenote/incident. Do I need to add a field in the table which I will then create a calculation for in the datapage report?

What would a calculation like this potentially look like? I would think it would use the Datediff, but I do not know how to identify the two different Note dates in the calculation. 

Datediff(day, [@field:Note_Dt1],[@field:Note_Dt2])???

Thank you!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @AGRAY23!

If you need to save the date difference value, you can add a field to your table that will hold the values. You can use the Formula datatype for that. 

-> https://howto.caspio.com/tables-and-views/data-types/formula-fields/

If you don't need to save the value and it's just for showing it on the report, you can skip creating a field on your table and just use Calculated Field instead.

-> https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

As for your calculation, looks like you are on the right track! Caspio's Function Reference article shows the same:

DateDiff(datepart, startdate, enddate)

I hope my answer helps!


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...