+ Start a Discussion
Bablu Kumar PanditBablu Kumar Pandit 

how to insert day of week in test class

AbhishekAbhishek (Salesforce Developers) 
You can do something like this:

e.StartDateTime = datetime.newInstance(2014, 9, 15, 12, 30, 0); e.EndDateTime = datetime.newInstance(2014, 9, 15, 13, 30, 0);

Here is the signature for the newInstance method:

public static Datetime newInstance(Integer year, Integer month, Integer day, Integer hour, Integer minute, Integer second)

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.