DataTable..::.Select 方法 看看MSND吧 private void GetRowsByFilter() { DataTable table = DataSet1.Tables["Orders"]; // Presuming the DataTable has a column named Date. string expression; expression = "Date > #1/1/00#"; DataRow[] foundRows; // Use the Select method to find all rows matching the filter. foundRows = table.Select(expression); // Print column 0 of each returned row. for(int i = 0; i < foundRows.Length; i ++) { Console.WriteLine(foundRows[i][0]); } }
table.Compute("min("时间字段")", "").ToString();
看看MSND吧
private void GetRowsByFilter()
{
DataTable table = DataSet1.Tables["Orders"];
// Presuming the DataTable has a column named Date.
string expression;
expression = "Date > #1/1/00#";
DataRow[] foundRows; // Use the Select method to find all rows matching the filter.
foundRows = table.Select(expression); // Print column 0 of each returned row.
for(int i = 0; i < foundRows.Length; i ++)
{
Console.WriteLine(foundRows[i][0]);
}
}
也可以
每3分钟执行命令,根据time字段查看这段时间内的接收数据的最早和最晚收到的值