Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get last day of previous year

Paka February 7, 2025

Hello , can i get last date of a previous year with using smart values?

2 answers

1 accepted

3 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2025

Hi @Paka -- Welcome to the Atlassian Community!

Please review the with... functions for date / time as you appear to be using an unsupported one: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-with-attribute---

There are several ways to do what you ask, including this one:

{{now.withDayOfYear(1).minusDays(1)}}

 

Kind regards,
Bill

0 votes
Jack Brickey
Community Champion
February 7, 2025

Hi @Paka , Welcome to the community.

Might I ask you to elaborate on what problem you are trying to solve as that might help provide a more complete/helpful answer. 

Paka February 7, 2025

I created automation and i want to compare two smart values  {{worklog.started.format("yyyy-MM-dd")}} and 2024-12-31 i want this second value to be last date of previous year  and not to be hardcoded but to be dynamically calculated   i tried {{now.minusYears(1).endOfYear}} but it didnt work,  any solutions?

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events