How to create DateTime with time as 00:00:00 using Apex in Salesforce?

Sample Code:

Datetime myDate = Datetime.newInstanceGMT(2008, 12, 1, 0, 0, 0);
system.debug('Value is ' + myDate);

Output:



No comments:

Post a Comment