Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Calculate difference from two date time picker

Dear Community,

I am a newbie and searching a solution to calculate the total time in hours and min from two date time pickers. One represents Start the other the End.

StartDate = 10.10.2020 4PM

EndDate = 11.10.2020 3:30PM

Result = 23:30

Goal is to automatically calculate the time difference and store it an another field.

In case on of you have an answer or even the same problem I would appreciate any information which could help me. I used the search function already but couldn´t figure out there to set scripts etc.

Best,

Kristian

2 answers

Hi @Kristian Koniarz ,

You may try the Table Filter and Charts for Confluence app and its Table Transformer macro.

Wrap your table in the Table Transformer macro and add the following custom SQL query:

SELECT T1.'Start Date',
T1.'End Date',
DATEDIFF(hour, T1.'Start Date', T1.'End Date') as 'Result'
FROM T1

Fri 2-1.pngFri 2-2.pngThen you need to set an appropriate Date format for the case:

Fri 2-3.pngNow you can preview the result:

Fri 2-4.pngHope this will help your case.

Thanks for your time and suggestion @Katerina Kovriga _Stiltsoft_,

Unfortunately I am not authorised to purchase new plugins. Still checking the web through inbuild script solutions.

Best,

Kristian

1 vote
Daniel Ebers Community Leader Nov 13, 2020

Hi Kristian,

I came across such requirement for calculation of a duration. We used "Jira Workflow Toolbox" with a formula like this:

%{Resolution} != null ? shortFormatDuration({End Date} - {Start Date}) : (%{Resolution} = null ? shortFormatDuration({Current date and time} - {Start Date}) : %{Resolution})

The last part is only to calculate against the current time in case the resolution is not yet set (meaning: the issue is still 'running'). You might need to adjust it according to your needs even in case you would go with Jira Workflow Toolbox.

Cheers,
Daniel

Thanks for your time and suggestion @Daniel Ebers 

Unfortunately I am not authorised to purchase new plugins. Would it be possible to implement a logic as you described with the help of an script? Which can be set inline during the workflow.

Best,

Kristian

Which plugins do you have on your instance? Without any plugin (app), Jira doesn't offer any scripting.

Hello @David Fischer _Innovalog_

so far I got MyGroovy and thought it could be realised with this software.

In case it wouldn´t cover my needs I need to drop my question.

Best,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

111 views 2 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you