Dim dateval As DateTime
dateval = Convert.ToDateTime(DataTable.Rows(intRow)(8).ToString())
Dim dateval1 As DateTime
dateval1 = Convert.ToDateTime(DataTable.Rows(intRow)(9).ToShortDateString())
Dim dateval As DateTime
dateval = Convert.ToDateTime(DataTable.Rows(intRow)(8).ToString())
Dim dateval1 As DateTime
dateval1 = Convert.ToDateTime(DataTable.Rows(intRow)(9).ToShortDateString())
Dim FIRST_DATE As String = lblSTdate.Text.ToString()
Dim LAST_DATE As String = lblENdate.Text.ToString()
Dim QueryString As New StringBuilder()
QueryString.Append("SELECT part_no, sum(quantity) as quantity")
QueryString.Append(" FROM inventory_transaction ")
QueryString.Append(" WHERE ( transaction_code = 'WOISS' OR transaction_code = 'INTSHIP' OR transaction_code = 'OESHIP') AND (part_no LIKE 'M%' OR part_no LIKE 'G%' OR part_no LIKE 'O-L%') AND (CONVERT (varchar(10), date_applied, 103) BETWEEN ('" + LAST_DATE + "') AND ('" + FIRST_DATE + "')) group by part_no ")
Dim sqlAdapter As New SqlDataAdapter(QueryString.ToString(), connection)
Dim DataTable As New DataTable("TestTable")
sqlAdapter.Fill(DataTable)