You need to sign in to do that
Don't have an account?
SFDC Coder 8
Getting Null value while fetching Day of Week
Hi All,
I am getting Null value while fetching value for day of week.
Here is my code.
I am getting Null value while fetching value for day of week.
Here is my code.
global class batchInsert Implements Schedulable, Database.Batchable<sObject>{ private Date d; public batchInsert(Date d) { d = (Date)d; } global database.queryLocator start(Database.BatchableContext BC) { Datetime dt = d; String dayOfWeek = dt.format('EEEE'); ... } global void execute(Database.BatchableContext BC, list <Obj1__c> scope) { List <Obj2__c> creList = new List<Obj2__c>(); Datetime dt = (DateTime)d; String dayIs = dt.format('EEEE'); ... }
I am not getting value at Line 12 for dayOfWeek (String dayOfWeek = dt.format('EEEE');)
Please suggest me what change I need to do.
Thanks in Advance
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
search for Using State in Batch Apex.