Try this:
string a=DateTime.ParseExact("29/07/2014 6:07:05 AM", "dd/MM/yyyy h:mm:ss tt", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy hh:mm:ss tt");
The exception this was giving to you is because ParseExact expects the format of the string to convert,not the format you want to convert it to. That is done in the ToString method.