Convert Date time in C#

Convert to different date time with dd/MMM/yyyy format where input date is in different format. 
  1. string currentdate = DateTime.Now();  
  2. CultureInfo provider = new CultureInfo("en-US");  
  3. string[] format = {  
  4.     "MM/dd/yyyy""M/d/yyyy""M/dd/yyyy""MM/d/yyyy""M/d/yyyy h:mm:ss tt""MM/d/yyyy h:mm:ss tt""M/d/yyyy h:mm tt",  
  5.         "MM/dd/yyyy hh:mm:ss""M/d/yyyy h:mm:ss",  
  6.         "M/d/yyyy hh:mm tt""M/d/yyyy hh tt",  
  7.         "M/d/yyyy h:mm""M/d/yyyy h:mm",  
  8.         "MM/dd/yyyy hh:mm""M/dd/yyyy hh:mm"  
  9. };  
  10.   
  11. object objvalue = DateTime.ParseExact(currentdate, format, provider, DateTimeStyles.None).ToString("dd/MMM/yyyy");