时间 2015-04-08 00:00:00
2015-04-10 00:00:00
//格式化时间
protected string Time(string id)
{
string text = "";
DataTable dt = DB.GetDataTable("s_start,s_end", "huodong", "i_state = 1 and i_id=" + id, "");
if (dt.Rows.Count > 0)
{
DateTime tt = Convert.ToDateTime(dt.Rows[0][0].ToString());
DateTime dd = Convert.ToDateTime(dt.Rows[0][1].ToString());
text = tt.GetDateTimeFormats(‘D‘)[0].ToString() + "-" + dd.GetDateTimeFormats(‘M‘)[0].ToString();
}
return text;
}
时间: 2024-12-09 20:28:41