DataList和Repeater、ListView中都可以用以下方式提取年月日:
<%#Convert.ToDateTime(DataBinder.Eval(Container.DataItem,"RecoverTime")).ToString("yyyy-MM-dd")%>
在GridView中可以用另一种方式提取年月日:

 <asp:BoundField DataField="BeginDate" HeaderText="开始日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" />



相关文章:

  • 2021-08-24
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-04-03
  • 2022-01-24
  • 2021-12-12
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2022-02-13
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案