I have the following routine embedded in a For each loop, and I have a counter which keeps track of which row
This piece of code is able to reference the previous row item by using Defaultview and making reference to the counter. Is there any way to achieve the same outcome utilizing dtRow instead of Defaultview?
Thanks
VB.NET:
Dim CurrentDate = Date.Parse(dtRow.Item("Date-Time"))
If count > 0 Then 'Cannot generate data on very first datapoint
Dim LastDate = Date.Parse(dt.DefaultView.Item(count - 1)("Date-Time"))
diff1 = CurrentDate.Subtract(LastDate)
If diff1 <= TimeIntervalThreshold Then
AmendFlag = False
End If
End If
This piece of code is able to reference the previous row item by using Defaultview and making reference to the counter. Is there any way to achieve the same outcome utilizing dtRow instead of Defaultview?
Thanks