
Alex Batzer asked a question.

Alex Batzer asked a question.

Hi @Alex Batzer, if you have two date fields in your Podio app you can leverage a calculation field to calculate the difference in days between those two dates. In the example below, I have two date fields (Date 1 and Date 2). I then have a calculation field with the below JavaScript (you will need to use your date fields for each of the "@Date" variables.
Once you have that set up, you should see the number of days between two dates in your items. From there, you can build a Podio report to show for example the average amount of dates between those two date fields across all of your items. Screenshots provided below as well a link to some more information about leveraging calculation fields for use cases like this.
var d1 = moment(@Date 1);
var d2 = moment(@Date 2);
d2.diff(d1, 'days');
https://docs.sharefile.com/en-us/podio/using-podio/creating-apps/calculations.html
Hi @Alex Batzer, if you have two date fields in your Podio app you can leverage a calculation field to calculate the difference in days between those two dates. In the example below, I have two date fields (Date 1 and Date 2). I then have a calculation field with the below JavaScript (you will need to use your date fields for each of the "@Date" variables.
Once you have that set up, you should see the number of days between two dates in your items. From there, you can build a Podio report to show for example the average amount of dates between those two date fields across all of your items. Screenshots provided below as well a link to some more information about leveraging calculation fields for use cases like this.
var d1 = moment(@Date 1);
var d2 = moment(@Date 2);
d2.diff(d1, 'days');
https://docs.sharefile.com/en-us/podio/using-podio/creating-apps/calculations.html

