在gridview里对日期字段设置dataformatstring="{0:yyyy-MM-dd}"没有任何作用的解决方法

本文介绍在使用GridView控件时,如何正确设置日期列的HtmlEncode属性为False以确保日期格式化功能正常工作。
<script type="text/javascript">google_ad_client = "pub-2048279401139630";google_ad_slot = "8856771542";google_ad_width = 728;google_ad_height = 90;document.write("<s"+"cript type='text/javascript' s"+"rc='http://pagead2.googlesyndication.com/pagead/show_ads"+"."+"js<script type="text/javascript">google_ad_client = "pub-2048279401139630";google_ad_slot = "8856771542";google_ad_width = 728;google_ad_height = 90;document.write("<s"+"cript type='text/javascript' s"+"rc='http://pagead2.googlesyndication.com/pagead/show_ads"+"."+"js'></scr"+"ipt>");</script>"");
<asp:BoundField DataField="ItemCode" HeaderText="产品编码 " SortExpression="ItemCode" /> <asp:BoundField DataField="ItemName" HeaderText="产品名称 " SortExpression="ItemCode" /> <asp:BoundField DataField="LibraryCollar" HeaderText="预警库龄天数" HeaderStyle-Width="100px" SortExpression="LibraryCollar" /> <asp:BoundField DataField="TotalBalanceQty" HeaderText="可用库存" HeaderStyle-Width="100px" SortExpression="TotalBalanceQty" /> <asp:BoundField DataField="MaximumInventory" HeaderText="最大库存" HeaderStyle-Width="100px" SortExpression="MaximumInventory" /> <asp:BoundField DataField="SafetyStock" HeaderText="安全库存数" HeaderStyle-Width="100px" SortExpression="SafetyStock" /> <asp:BoundField DataField="CreateBy" HeaderText="<%$ Resources:lang,CreateBy%>" SortExpression="CreateBy" HeaderStyle-Width="60px" /> <asp:BoundField DataField="CreateDateTime" HeaderText="<%$ Resources:lang,CreateDateTime%>" SortExpression="CreateDateTime" HeaderStyle-Width="140px" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" /> <asp:BoundField DataField="ModifyBy" HeaderText="<%$ Resources:lang,ModifyBy%>" SortExpression="ModifyBy" HeaderStyle-Width="60px" /> <asp:BoundField DataField="ModifyDateTime" HeaderText="<%$ Resources:lang,ModifyDateTime%>" SortExpression="ModifyDateTime" HeaderStyle-Width="140px" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" /> <asp:BoundField DataField="Status" HeaderText="状态 " SortExpression="Status" />可用库存大于最大库存时本条数据变红
07-25
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值