Compare values in datatable using asp.net
Posted on 2006-07-21
I want to test to see if the time in date changes. If it does i want to write out a blank line. I can write out a blank line just fine but I need to know how to compare the timein values to see if they change each time.
query="select eh.recordid, firstname + ' ' + lastname as name, timein, timeout, description from employeehours as eh inner join employeelist as el on eh.employeeid = el.employeeid inner join masterjobcodelist as mjc on eh.jobcode = mjc.jobcode where firstname = 'Justine' and lastname = 'Cleary' and timein > CONVERT(datetime, '" & strCurrentdate & "', 102) order by timein "
Dim da As SqlDataAdapter = New SqlDataAdapter(query, objconn)
dim Tbl = new DataTable()
dim cou as integer = Tbl.Rows.count()
dim objRow as datarow
'Get the time in date
while i <> cou
' Adding rows
objRow = Tbl.newrow()
'objRow("columnNames") = ...
i = i + 1
dgAddressBook.DataSource = Tbl