Months elapsed

Use case

Create a calculated number field that displays the elapsed time in months since a date selected in a Date Picker field.


⚒️ Configuration

Create a new Calculated Number Field (by JWT) custom field and name it properly.

Providing a description will help you to identify what the custom field does but this step is optional.

Parser expression

Add the following parser expression:

Bash
{issue.cfaaaaa} != null ? ((year({system.currentDateTime}, LOCAL) - year({issue.cfaaaaa}, LOCAL))*12 + month({system.currentDateTime}, LOCAL) - (month({issue.cfaaaaa}, LOCAL))) : null

Do not forget to replace {issue.cfaaaaa} with the field codes of your Date Picker field.

Display format

Content type

Choose Duration

Duration display format

The display format is Number with the following custom format.

Bash
## month(s)


⚒️ Related use cases