grid默认只显示日期不显示时间,我按以下方式设置还是不行,请知道的朋友帮看如何写这代码
gridView1.Columns["输入日期"].DisplayFormat.FormatString ="{0:dddd dd/MM/yy 00:00}";

解决方案 »

  1.   

    <asp:BoundField HeaderText="预定日期" DataField="OperationDate" DataFormatString="{0:yyyy-MM-dd hh:mm:ss}" HtmlEncode="False">
      

  2.   

    楼上正解,你直接在aspx页面设置就行了,不需要到cs里去写
      

  3.   

    <asp:BoundField DataField="OutDate" HeaderText="出院日期" DataFormatString="{0:d}" HtmlEncode="False"                                    SortExpression="OutDate">
                                        <ItemStyle HorizontalAlign="Center" Width="80px" />
                                        <HeaderStyle Width="80px" />
                                    </asp:BoundField>
    这样就ok了
      

  4.   

    在sql语句中处理