Help!
I thought this was going to be an easy one!
I run a report via automation on Monday morning, I want the date in the subject to be the Friday before date.
Now = February 5, 2024
{{now.toBusinessDayBackwards}} = 2024-02-05T15:11:25.7-0500
{{now.toBusinessDayBackwards.LongDate}} = February 5, 2024
The date should be February 2, 2024
I believe its a known issue, please try {{now.minusBusinessDays(1)}}
Hi @Melissa C
I am using Jira Cloud, not Server, so please try this with your version:
{{now.withNextDayOfWeek("FRI").minusDays(7)}}
It is clunky but works...subject to time zone stuff and when you run the rule.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy @Kalyan Sattaluri
Almost! I got this
{{now.withNextDayOfWeek("FRI").minusDays(7)}} = 2024-02-02T16:04:17.5-0500
But I added "longDate" and that worked
{{now.withNextDayOfWeek("FRI").minusDays(7).longDate}} = February 2, 2024
Thank you I added "longdate" and that worked
{{now.minusBusinessDays(1).longDate}} = February 2, 2024
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done!
All of those format modifiers return the date (or date / time) formatted as text. When you need to keep the value as a date (such as to set to another date field) leave the format off.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.