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 Salesforce Apex.
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 Salesforce Apex.