Play Games

Search This Blog

Monday, December 21, 2020

convert date to datetime in apex salesforce - Salesforce Globe For You

 convert date to datetime in apex salesforce  - Salesforce Globe For You 

Example:

Date dtTodayDate = System.Today();

Datetime dtTodayDateTime = datetime.newInstance(dtTodayDate.year(), dtTodayDate.month(),dtTodayDate.day());

system.debug('Date in DateTime:'+dtTodayDateTime);

Output:



No comments:

Post a Comment