How to remove time from date in Salesforce?

format() will remove the time stamp from Date.

Here is an example:

Date dt = System.Today();
Date newdt = dt.format();

Leave a Reply