Added due date on case which is a date field. Trying to get this as dateTime and here is my code:
case c = [select id, caseNumber, Due_Date__c, status, type from case limit 1];
Date i = (c.Due_Date__c);
system.debug(i);// returns 2015-08-07 00:00:00
DateTime t = dateTime.newInstance(i, '11:59:59');
//DateTime t = DateTime.parse(i, 11, 59, 59);
//DateTime Dt = DateTime.newInstance(i, 11, 59, 59);
system.debug(t);
Getting Error: "Variable does not exist: datetime"
Update: crmprogdev solution below works perfectly. I found another solution for the same using time.newinstance.
case c = [select id, due_date__c from case where due_date__C != null limit 1];
date d = c.due_date__C;
system.debug(d);
DateTime dt = datetime.newInstance(d, Time.newInstance(23,59,59,59));
system.debug(dt);