Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function subtracts two timestamps using a JWT calendar. The time time difference will be returned in milliseconds.


Code Block
languagebash
titleSyntax
linenumberstrue
timeDifference(firstDate, dateToSubtract, calendarName, timeZone) #Output: Number


UI Expand
titleExamples

Include Page
DECADIS:_snip_my_schedule_calendar
DECADIS:_snip_my_schedule_calendar

Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", LOCAL)


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar.

The result will return milliseconds.


Code Block
languagebash
linenumberstrue
timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", LOCAL) / {HOUR}


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar.

The result will return hours.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
firstDate

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).
dateToSubtract

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).

calendarName

Status
subtletrue
titletext

The name of the used JWT calendar.
timeZone

Status
subtletrue
titletimezone

The time zone used for the conversion. 



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber
 .




UI Text Box
sizemedium
typeinfo

Variant of the function where you can define an additional JWT calendar specification.


Code Block
languagebash
titleSyntax
linenumberstrue
timeDifference(firstDate, dateToSubtract, calendarName, additionalSpecifier, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", "2020/05/20 {;}", LOCAL)


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar and additionally ignoring the 20th of May, 2020.

The result will return milliseconds.


Code Block
languagebash
linenumberstrue
timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", "2020/05/20 {;}", LOCAL) / {HOUR}


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar and additionally ignoring the 20th of May, 2020.

The result will return hours.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
firstDate

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).
dateToSubtract

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).

calendarName

Status
subtletrue
titletext

The name of the used JWT calendar.
additionalSpecifier

Status
subtletrue
titletext

A text containing an additional JWT calendar specification
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_timedifference" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(error)
NotesNot possible because JWT's Calendars are not implemented in the Cloud version.




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged


Page properties
hiddentrue


Short descriptionSubtracts two timestamps based on a JWT calendar specification.
Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourBlue
title2.2.39

Label