If you have a string with the date you can first convert it to the
DateTime[
^] type and then back to a string again in the format you prefer.
For example:
string inputData = "12/23/2014";
DateTime tmpDate = DateTime.ParseExact(inputData, "MM/dd/yyyy", null);
string output1 = tmpDate.ToString("dd-MM-yyyy");
string output2 = tmpDate.ToString("yyyyMMdd");
Here is a good page with different date formats
Custom Date and Time Format Strings[
^]