How to change date time format in a grid in asp.net mvc
<p>I want to change my date time format from <code>7/20/2016 10:30:00 AM</code> to <code>20 July 2016 10:30 AM</code></p>

<p>Bellow is the image in where i want to change the format </p>

<p><a href="https://i.stack.imgur.com/E9V9R.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E9V9R.jpg" alt="enter image description here"></a></p>

<p>Bellow is my code in controller where i have a events data table and in there columns i have added the event name , occurrence time and recovery time </p>

<pre><code>DataTable events = new DataTable();
        events.Columns.Add("Event_Name", typeof(string));
        events.Columns.Add("Occurrence_Time", typeof(string));
        events.Columns.Add("Recovery_Time", typeof(string));


                while (reader_events.Read())
                {

                    events.Rows.Add(Convert.ToString(reader_events["Event_Name"]), 
                    Convert.ToString(reader_events["Occurrence_Time"]).ToString(),
                    Convert.ToString(reader_events["Recovery_Time"]));           


                 }
</code></pre>

<p>After that i have passed these events in view data
    ViewData["events"] = events;</p>

<p>Bellow is my razor syntax </p>

<pre><code>if (ViewData["events"] != null)
{
  if (ViewData.Values != null &amp;&amp; ViewData.Values.Count() &gt; 0)
  {
     foreach (System.Data.DataRow dr in (ViewData["events"] as System.Data.DataTable).Rows)
     {
        &lt;tr&gt;
           &lt;td style="border:1px solid black; color:green;font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"&gt;
              @dr[0]

            &lt;/td&gt;
            &lt;td style="border:1px solid black; color:green;font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"&gt;
               @dr[1]
            &lt;/td&gt;
            &lt;td style="border:1px solid black; color:green;font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"&gt;
              @dr[2]
            &lt;/td&gt;
       &lt;/tr&gt;
       }
      }
    }
</code></pre>

<p>Any help would be highly appreciated </p>