Use DateTime.TryParseExact to convert it to a DateTime value, then use ToString to output the new format:
string input = "17-July-2017";
DateTime dt;
if (!DateTime.TryParseExact(input, "dd-MMMM-yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dt))
{
....
return;
}
Console.WriteLine(dt.ToString("dd-MM-yyyy"));