New answers tagged

0 votes

Calculate the Fiscal Quarter of a Date in a Formula Field if the FY starts in Aug

In addition to @Derek's approach, we can also try with CASE function. Since Q1 corresponds to August i.e. 8th month , we need to subtract 7 to equalise it with January which is normally the start of ...
  • 1,003
1 vote

Calculate the Fiscal Quarter of a Date in a Formula Field if the FY starts in Aug

Well, the obvious problem with this approach is that January would evaluate like CEILING((1 - 7) / 3) => CEILING(-6/3) => -2 Simple subtraction isn't the right approach here. Your actual goal ...
  • 54.6k
4 votes
Accepted

Best practices Use == or isSameDay apex date

The main difference is that == (equality operator) is null safe, while Date.isSameDay() is not, so I would prefer the first over the latter. I.E. Date d1 = System.today(); Date d2; // default null ...
  • 5,584

Top 50 recent answers are included