How to display a date time in 16 Nov 2011 15:12 format
        Posted  
        
            by 
                Mark
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mark
        
        
        
        Published on 2011-11-22T17:32:07Z
        Indexed on 
            2011/11/22
            17:51 UTC
        
        
        Read the original article
        Hit count: 241
        
I have a grid view column in which  I give the datefomat as dd MMM yyyy HH:mm and in code behind databound I change the time, the same time in database is not shown in the gridview, because of that the date is not displayed in 16 Nov 2011 15:12 format, it is displayed in 16/11/2011 15:12 format, how can i display it in 16 Nov 2011 15:12 format
asp
<asp:BoundField DataField="SendDate" ItemStyle-Width="15%" 
  HeaderText="Sent At" DataFormatString="{0:dd MMM yyyy HH:mm}"
                            SortExpression="SendDate" />
c#
   double timeDifference = Convert.ToDouble(Session["utimezone"].ToString());                    
            e.Row.Cells[5].Text = 
 Convert.ToString(senddate.AddMinutes(timeDifference * 60));    
        © Stack Overflow or respective owner