# Date formats in Jira Automation: syntax and examples

URL: https://goingstellar.ro/reference/smart-values/date-format/

Add a format name or format("pattern") to the end of a date smart value to turn the default ISO output into something people can read. The built-in names cover short, medium, long and full dates and times, plus the forms that Jira and JQL expect. Use format() when none of them fits.

## Syntax

```
{{issue.created.jiraDate}}
{{issue.created.format("dd/MM/yyyy")}}
{{issue.created.as("dd MMM")}}
```

## Arguments

- `pattern` (required: yes): A Java date pattern in straight double quotes, used with format() or as()

## Works on

- Fields: created, updated, duedate, resolutiondate, date picker fields, now
- Formats: jiraDate, jiraDateTime, jqlDate, jqlDateTime, shortDate, shortTime, shortDateTime, mediumDate, mediumTime, mediumDateTime, longDate, longTime, longDateTime, fullDate, fullTime, fullDateTime
- Returns: text

## Examples

```
{{issue.created.shortDateTime}}
```

Gives a compact date and time for a Slack message or a table cell.

Result:

```
11/29/26, 4:21 PM
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.mediumDate}}
```

Shows the due date as words, which avoids day and month mix-ups in e-mails.

Result:

```
Dec 15, 2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.fullDate}}
```

Adds the weekday, for a message such as the request that arrived on a Sunday.

Result:

```
Sunday, November 29, 2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.jqlDateTime}}
```

Produces the date and time in the form JQL accepts, to use in a JQL condition or search.

Result:

```
2026-11-29 16:06
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.format("EEE d MMM")}}
```

Prints a short weekday and day for a reminder line.

Result:

```
Tue 15 Dec
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.format("dd MMM yyyy 'at' HH:mm")}}
```

Mixes a pattern with literal text; the literal word goes in single quotes inside the pattern.

Result:

```
29 Nov 2026 at 16:21
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `This issue was updated at {{issue.updated.shortTime}}.`: run on Jira Cloud, 29 Nov 2026: the documentation says `This issue was updated at 2:40 AM. (with a normal space before AM)`, the actual result is `This issue was updated at 4:00 PM.`.

## Pitfalls

- In `format()` patterns, `MM` is the month and `mm` is the minute. `format("dd/mm/yyyy")` on a work item created at 16:21 prints 29/21/2026 (checked on Jira Cloud, November 2026).
- The pattern has to sit in straight double quotes. Single quotes cause a runtime error, and a pattern with no quotes or with curly quotes renders empty (checked on Jira Cloud, November 2026).
- Time formats put a narrow no-break space (U+202F) before AM or PM, not a normal space. A text comparison against `4:21 PM` typed with a normal space will not match.
- Names print in US English unless you add a locale, see the locale() entry. The default output is the long ISO form with a +0000 offset.

## Questions and answers

### Do the format names need parentheses?

No. The documentation says `{{now.jiraDate}}` and `{{now.jiraDate()}}` return the same result, and the version with parentheses also rendered correctly when checked.

### What is the difference between format() and as()?

In the examples checked, `as("dd MMM")` printed 29 Nov, the same kind of result as format(). The documentation lists both without describing a difference.

## Related

- [{{now}}](https://goingstellar.ro/reference/smart-values/now/)
- [locale() and withLocale()](https://goingstellar.ro/reference/smart-values/date-locale/)
- [setTimeZone() and convertToTimeZone()](https://goingstellar.ro/reference/smart-values/date-timezone/)
- [plusDays() / minusDays() and other units](https://goingstellar.ro/reference/smart-values/date-plus-minus/)
- [toDate (text to date)](https://goingstellar.ro/reference/smart-values/todate/)
- [dayOfMonth, dayOfWeekName and other date attributes](https://goingstellar.ro/reference/smart-values/date-attributes/)

## Sources

- [Jira smart values: date and time (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/)
- [Use smart values to manipulate and format dates (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/)

