How to remove time from date Salesforce?

format() will remove the time stamp from Date.

Sample Code:

Date dat = System.Today();
System.debug(dat.format());


format() is used to get Date from Datetime using apex.

1 comment: