Going Stellar

Home/Smart values reference

Jira Automation smart value

toStartOfDay and toDateTimeAtStartOfDay: examples

These functions change only the time part of a date. toStartOfDay sets it to 00:00, toCurrentTime sets it to the time of the run, and the toDateTimeAt versions do the same in a time zone you name. Use them to compare dates by day or to build a clean start-of-day value.

Syntax

{{[date].toStartOfDay}}
{{[date].toCurrentTime}}
{{[date].toDateTimeAtStartOfDay("zone")}}
{{[date].toDateTimeAtCurrentTime("zone")}}

Arguments

ArgumentWhat it isRequired
zoneA time zone id such as Australia/Sydney, or a user's timeZone valueno

Works on

  • Fields: now, created and other date-time values
  • Returns: the same day with the time replaced

Examples

{{now.toStartOfDay}}

Today at midnight UTC.

Result:

2026-11-29T00:00:00.0+0000

Run on Jira Cloud on .

{{now.toCurrentTime}}

Keeps the date and sets the time of the run.

Result:

2026-11-29T16:02:38.6+0000

Run on Jira Cloud on .

{{issue.created.toStartOfDay.format("yyyy-MM-dd HH:mm")}}

Strips the time from the creation date before formatting.

Result:

2026-11-29 00:00

Run on Jira Cloud on .

{{now.toStartOfDay.plusDays(1)}}

Tomorrow at midnight, a clean upper bound for a day window.

Result:

2026-11-30T00:00:00.0+0000

Run on Jira Cloud on .

{{issue.created.toDateTimeAtStartOfDay("Australia/Sydney")}}

Midnight of the creation day in Sydney, shown with the +1100 offset.

Result:

2026-11-29T00:00:00.0+1100

Run on Jira Cloud on .

{{now.toDateTimeAtStartOfDay(issue.reporter.timeZone)}}

Midnight in the reporter's own time zone, which came out as +0200.

Result:

2026-11-29T00:00:00.0+0200

Run on Jira Cloud on .

Pitfalls

  • The docs examples pass the word timezone without quotes. Run as written, toDateTimeAtStartOfDay(timezone) and toDateTimeAtCurrentTime(timezone) still rendered, and the start of day stayed at +0000 (checked on Jira Cloud, November 2026). Treat it as a placeholder, not a keyword.
  • An invalid zone does not fail. toDateTimeAtStartOfDay("Nope/Zone") rendered a normal +0000 date (checked on Jira Cloud, November 2026), so a typo in a zone id goes unnoticed.
  • These work on dates with a time. {{issue.duedate.toStartOfDay}} and {{issue.duedate.toCurrentTime}} rendered empty because a due date is date-only (checked on Jira Cloud, November 2026).
  • Parentheses on the plain forms are accepted: {{now.toStartOfDay()}} renders the same as without them.

Sources

  1. Jira smart values: date and time (Atlassian Support)

Markdown version · All smart values