An effort to bring a revolution in Salesforce.

Tuesday, 26 July 2016

Convert Date to DateTime in salesforce


 

Simple code is used to convert Date to DateTime data type using Apex


Sample Code:

 
 
Date dToday = System.Today();
Datetime dt = datetime.newInstance(dToday.year(), dToday.month(),dToday.day());
, ,

No comments:

Post a Comment

Get Gmail, Docs, Drive, and Calendar for business