Forums

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

How to identify odd or even days

Soluciones TIC January 28, 2023

How to create an automation that performs a specific task when it is an odd or even day in the month.

1 answer

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Champion
January 28, 2023

Hey @Soluciones TIC - 

What I would do in this case is create a rule that triggers every day, and within that rule, you can use a combination of Math and Date/Time Smart Values functions to figure out whether the day is odd or even.

To test this, I used an If-Else condition block that contains:

  • Advanced compare condition 
    I get today's date ({{now}}) for my time zone (.convertToTimeZone), and then use the modulo (%) operator within a math expression ({{#=}}) to see if it is evenly divisible by 2.

If that value equals zero, then today's day is even. Else it is odd.

The end result looks like this. You would of course replace the audit log actions with the tasks you'd like to run.

Screen Shot 2023-01-28 at 10.25.36 PM.png

Please let me know if this ends up working for you!

Soluciones TIC January 30, 2023

Thanks for the answer, I was able to solve the issue with the following condition.

Captura de pantalla 2023-01-30 103549.png

Like Darryl Lee likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events