New answers tagged date
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
Related Tags
date × 680apex × 248
datetime × 160
formula × 93
soql × 65
formula-field × 59
marketing-cloud × 56
visualforce × 50
ampscript × 24
lightning-web-components × 22
javascript × 22
lightning-aura-components × 20
query × 20
formatting × 20
workflow × 19
trigger × 15
reporting × 15
time × 15
format × 15
lightning × 14
field-update × 14
timezone × 14
visual-workflow × 13
opportunity × 13
process-builder × 12