To convert String to Date in Salesforce February 9, 2012August 31, 2022InfallibleTechie Admin The below simple code is used to convert String to Date data type using Apex Sample Code: String todate = '12/27/2013'; Date dt = Date.parse( todate ); System.debug(' Parsed Date is ' + dt ); Output: