How to create DateTime with time as 00:00:00 using Apex in Salesforce? May 28, 2014June 9, 2022InfallibleTechie Admin Sample Code: Datetime myDate = Datetime.newInstanceGMT(2008, 12, 1, 0, 0, 0); system.debug(‘Value is ‘ + myDate); Output: