Difference between 2 dates - how to?

Rumceisz July 16, 2014

Hi All,

we have Reporting plugin which enables to calculate the difference between two dates. Do you know how to achieve this? We don't find any docs for this.

We need the difference in days or month.

Thanks in advance,

Rumi

2 answers

0 votes
CelesteCS July 4, 2016

Hello!

For any calculations in Confluence, including calculations over tables, you may use CelesteCS Math for Confluence. There are versions for both Confluence Server and Confluence Cloud.

Assume you have a table with three rows and four columns: A till D with two rows and want to summarize elements from B2 to D2. Then here is the formula you should specify in A2:

SUM(Table1.B2:D2)

If you want to calculate average value, use AVG function:

AVG(Table1.B2:D2)

As you see, it is very simple and is similar to EXCEL with equal set of functions.

There is a plenty of other functions in the macro, so you may perform any calculations using formulas in EXCEL style.

Thanks!

0 votes
Yagnesh Bhat
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2014

If you are planning to write a plugin to do this, then you can have that plugin have a macro in it that takes two dates as parameters and calculates their difference. To calculate this difference , you can use the Joda API that already comes bundled within the confluence plugin package. More about this here : http://www.joda.org/joda-time/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events