1) Give a description of the problem
I’ve searched everywhere and attempted all I can think of on my own and cannot figure out how to calculate the date of the next Sunday after a specific date in an expression. I am trying to calculate the date of the 4th Sunday before the 25th of December (for this year it would be Nov 29th). In the snapshot, I have placed a {‘J’} in place of the expression that I am trying to calculate.
2) What is the expected behaviour?
The expression would output the date corresponding to the 4th Sunday before the 25th of December for the present {$year}. This year, for example, it should output Nov 29th, 2020.
3) What is happening/not happening?
I have tried converting a formula that works in Excel to match the WebCoRE expression syntax with no success.
=(int((A1-22)/7)7)+1 ==> addDays(int(addDays(‘Dec 25, {$year}’,-22)/(786400))(786400),1)
That expression evaluates to Jan 9th, 1970 8:36AM.
I understand that Excel doesn’t use Unix timestamps but they both use a fixed starting point so trying to calculate the amount of whole weeks since that starting point should still be usable.
I’ve tried other variations of that expression (calculating in milliseconds, changing formatting of the input date, etc).
4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
N/A