running32
asked on
Compare values in datatable using asp.net
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.
Thank you
dim query
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()
da.Fill(Tbl)
Tbl.columns.add("columnNam es")
dim i
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") = ...
Tbl.rows.add(objRow)
i = i + 1
end while
dgAddressBook.DataSource = Tbl
dgAddressBook.DataBind()
Thank you
dim query
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()
da.Fill(Tbl)
Tbl.columns.add("columnNam
dim i
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") = ...
Tbl.rows.add(objRow)
i = i + 1
end while
dgAddressBook.DataSource = Tbl
dgAddressBook.DataBind()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks