To achieve that trigger only works on selected day
means,
Formatting Date
- Date d = System.Today();
- // you need to format date to date/time in order to format.
- DateTime dt = DateTime.newInstance(d.year(), d.month(), d.day());
- String todayDay = dt.format('EEEE');
- if(todayDay != 'Saturday' || todayDay !='Sunday')
- {
- // Process your logic.
- }
Formatting Date/Time
- DateTime dt = System.now();
- String todayDay = dt.format('EEEE');
- if(todayDay != 'Saturday' || todayDay !='Sunday')
- {
- // Process your logic.
- }
Is Salesforce your passion... Looking for an extra-ordinary training session, new to coding, worried about placements
ReplyDeleteWe are here to help you
"Attend the free demo (write to us on hello@diac.co.in for confirming your timing)
Refer you friends and get great discounts
Salesforce Developer and Admin Training along with Certification Training
Highly optimized and easy to learn Salesforce online training which includes Salesforce ADMIN, DEVELOPMENT, LIGHTNING, BUSINESS ANALYST.
Call us @91-9310096831