Convert String to Date in salesforce

The below sample code is used to convert String to Date data type using Apex

String todate = '12/25/2015';
Date dt = Date.parse(todate);

Leave a Reply