Forums

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

Need help with a smart value for month/day.

Wagner Thierry November 29, 2022

Is there a Smart Value that I can use to define only Month-Day?

I know that:

{{now.jiraDate}}

//returns

2020-08-18

I want the same as the above but without the year, only the month/day.

 

What I'm trying to do is create an automation that runs every day at 9 am and 4 pm, the only exception is that they will not run on January 1st and December 25th.

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
November 30, 2022

Hello @Wagner Thierry 

You can extract the month portion of a date using:

{{[date].monthOfYear}}

You can extract the day portion of a date using:

{{[date].dayOfMonth}}

You can use those in Conditions to determine if the date is Jan. 1 or Dec. 25.

Other attributes that can be extracted from dates are listed here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Available-attributes

Suggest an answer

Log in or Sign up to answer