Gridview not showing first set of data from my query
-
Gridview not showing first set of data from my query. e.g if my date range is 01/09/2007 to 30/09/2007, the gridview will display data from 02/09/2007 to 30/09/2007 if the range selected is 02/09/2007 to 30/09/2007 it displays data from 03/09/2007 to 30/09/2007 see my query expression ------------------------ Dim strCmd As String = "Select * From vwPOVendor " strCmd += " Where PODate Between '" & Format(Date1, "yyyy-MM-dd hh:mm:ss") & "' AND '" & Format(Date2, "yyyy-MM-dd hh:mm:ss") & "'" Dim strConn As String = ConfigurationManager.ConnectionStrings("PODataConnectionString1").ConnectionString Dim sqlConn As SqlConnection = New SqlConnection(strConn) If sqlConn.State = ConnectionState.Closed Then sqlConn.Open() End If Dim ds As DataSet = New DataSet() Dim da As SqlDataAdapter = New SqlDataAdapter(strCmd, sqlConn) da.Fill(ds, "vendors") 'Closing Sql Connection sqlConn.Close() Label1.Text = ds.Tables("vendors").Rows.Count grdPOrders.DataSource = ds.Tables("vendors") grdPOrders.DataBind() ive also tried -------------- strCmd += " Where PODate >= '" & Format(Date1, "yyyy-MM-dd hh:mm:ss") & "' AND PODate <= '" & Format(Date2, "yyyy-MM-dd hh:mm:ss") & "'" please help t.aransiola