给你一段程序,我的,虽然不是针对您的问题,希望有所帮助
Protected arrtime() As DateTime '存放时间的数组(可变维)
For j = 0 To Me.dsbig.Tables("T217").Rows.Count - 1
'定义数组
ReDim arrtime(DateDiff(DateInterval.Day, CDate(Me.startdate), CDate(Me.enddate)))
For i = 0 To DateDiff(DateInterval.Day, CDate(Me.startdate), CDate(Me.enddate))
arrtime(i) = DateAdd(DateInterval.Day, i, Me.startdate)
next
next
you should use sql to find the same number between the two table
then use for or do to write the value you get!
the sql just like so:
select * from test1 inner join test2 on test1.testid=test2.testid