Apex Code
public class TaskTriggerHelper {
public TaskTriggerHelper(){
}
public static void createTask(list<Task> tskList){
list<task> listOfTask = new list<task>();
for(task tsk : tskList){
DateTime myDateTime = DateTime.newInstance(task.ActivityDate,0,0,0);
}
}
}
Best Answer
If you want to use the
newInstance
method, there are many signatures defined, but not the one you are trying to use:If you already have a date, the simplest would be: