Skip to main content
5 votes

How to add days with Date field?

addDays(additionalDays) Adds the specified number of additional days to a Date. Date methods you can simply use addDays method for(BEV_BillingEvent__c BillingEvent:lstBillingEvent) { Date d=...
Ratan Paul's user avatar
  • 22.8k
3 votes

Can different case teams in different territories have different holidays for calculating escalations, etc?

This can be achieved by using Business Hours (one BH record for each territory) and then associating a different set of holidays for each business hours record. Then use the standard lookup from Case ...
DavidSchach's user avatar
  • 5,966
3 votes

Journey Builder | Is there an out of the box feature to send emails on the next day if it falls on a Canadian Statutory Holiday?

It would be pretty difficult to do it mid-journey, as you'd probably need to find a method of making a decision split based in multiple dates (a custom activity perhaps) You could however do it if it'...
Gravitai's user avatar
  • 2,850
3 votes
Accepted

Apex Business Hours calculation glitch

You've hit upon a problem, all right, but not what you expected; you're using an Integer to try add milliseconds, which means you're limited to about 2 billion before you end up going negative. ...
sfdcfox's user avatar
  • 502k
2 votes
Accepted

How to add days with Date field?

Try the below code. Its much simpler and covers your requirement (I believe). for(BEV_BillingEvent__c BillingEvent:lstBillingEvent) { Datetime dt = DateTime.newInstance(BillingEvent....
human's user avatar
  • 675
1 vote

Calculate No of working days difference between two dates?

For excluding holidays, Configure Business Hours excluding holidays and calculate time difference as below public static Integer getBusinessHourTimeDifference(Datetime startDate, Datetime endDate) ...
Santanu Boral's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible