标签:style class blog c code ext
Convert.ToDateTime(dt.Rows[i]["inDate"]).ToString() 显示为2014/05/01
05:48:09
Convert.ToDateTime(dt.Rows[i]["inDate"]).ToLongDateString()
显示为2014年05月01日
Convert.ToDateTime(dt.Rows[i]["inDate"]).ToString("yyyy-MM-dd")
显示为2014-05-01
Convert.ToDateTime(dt.Rows[i]["inDate"]).ToLongTimeString()
显示为05:48:09
使用:
<li class="newli"><div class="repeateTitle"><a href=‘addReads.aspx?id=<%#Eval("ID") %>&tn=news&fn=news&t=<%#Eval("newsType") %>‘><%#Helper.HelperString.cutString(Eval("newsName").ToString(),25) %></a></div><div class="releaseTime"><%#Eval("inDate","{0:yyyy-MM-dd}") %></div></li>
if (HelperExecuteSql.ExecuteSql("update newsInfo set newsName=‘" + UtxtTitle.Text.Trim() + "‘,newsType=‘" + UddrRowType.SelectedItem.Value + "‘,inDate=‘" + Convert.ToDateTime(Utxttime.Text.Trim()).ToString("yyyy-MM-dd") + "‘,indexShow=‘" + Convert.ToByte(UckbIndexShow.Checked) + "‘ where ID=‘" + Uid + "‘") > 0)
标签:style class blog c code ext
原文地址:http://www.cnblogs.com/shy1766IT/p/3736391.html