Date and Date time in Salesforce

Date dat =;  //Returns today's date
Date dt = dat.addDays(2);  // Returns day after tomorrow's date

Datetime dt =;  // Returns current date and time
Datetime dt1 = dt.addHours(2);  // Returns 2 hours ahead of current date and time 

No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit