在表格中,any1是否知道如何選擇指定的行並在指定列中取時間數據,然後將數據放入TimeSpan?從表格中提取時間數據並將其放入TimeSpan中
DataRow[] selectIDRow = RetailCamDataSet1.Tables["smBranchWorkingDayInfo"].Select("ID=" + ID);
foreach (DataRow row in getTimeDifference)
{
TimeSpan startTime = new TimeSpan(); //Need to put the data into the bracket instead of using hard code
TimeSpan endTime = new TimeSpan(20, 00, 00); //Hard coded
TimeSpan timeDifference = new TimeSpan();
timeDifference = endTime.Subtract(startTime);
double minutes = timeDifference.TotalMinutes;
normalCount = minutes/15;
什麼樣的格式是指定列中的時間數據? – 2012-03-27 01:27:50
小時:分鐘:秒 hh:mm:ss – hakunabean 2012-03-27 01:30:57