1.How to display “dd-MM-yyyy” format from database to text box ?
Covert.ToDateTime(ds.Tables[0].Rows[0][“NewsDate”].ToString()).ToString(“dd-MM-yyyy”);
2. How to display “dd-MM-yyyy” with exact time from database ?
Convert.ToDateTime(ds.Tables[0].Rows[0][“NewsDate”]).ToString(“dd-MM-yyyy ss:mm:hhhh tt”);
3.How to bind “dd-MM-yyyy” in gridview ?
<asp:TextBox id=”txtCloseDate” Text='<%# Eval(“CloseDate”,”{0:dd/MM/yy}”) %>’ runat=”server” />