日期:2014-05-17 浏览次数:20463 次
static void Main(string[] args)
{
DataTable dt = new DataTable();
dt.Columns.Add("visitdatetime", typeof(DateTime));
DataRow dr = null;
dr = dt.NewRow();
dr["visitdatetime"] = DateTime.Parse("2013/8/1 10:00:07");
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["visitdatetime"] = DateTime.Parse("2013/8/2 10:00:07");
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["visitdatetime"] = DateTime.Parse("2013/7/1 10:00:07");
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["visitdatetime"] = DateTime.Parse("2013/6/1 10:00:07");
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["visitdatetime"] = DateTime.Parse("2013/7/2 10:00:07");
dt.Rows.Add(dr);