title: Error in c# subtracting 30 days from current date ? winforms
body: <p>I need to subtract 30 days from current date then i filter query but i didn't get any results/ output why whats my error on this code</p>
  
  <pre><code>DateTime curdate = DateTime.Now;
  curdate = curdate.AddDays(-30); // if i give -4 instead of -30 the query will bind data
  DateTime curdate1 = DateTime.Now;
  
  validateDept.InitializeConnection();
  OleDbConnection connection = new OleDbConnection(validateDept.connetionString);
  OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT InvoiceId, InvoiceNumber, InvoiceDate, (Select CustomerId from Customer Where Customer.CustomerId=NewInvoice_1.CustomerName) AS CustomerId, (Select CustomerName from Customer where Customer.CustomerId = NewInvoice_1.CustomerName) AS CustomerName, DueDate, Tax, GrandTotal, CompanyId FROM NewInvoice_1 WHERE InvoiceDate &gt;= '" + curdate + "' AND InvoiceDate &lt;= '" + curdate1 + "' ", connection);
  DataSet sourceDataSet = new DataSet();
  adapter.Fill(sourceDataSet);
  gridControl1.DataSource = sourceDataSet.Tables[0];
  </code></pre>
  
  <p>empty table only shows if i run this code. If i change -30 to -4 then it fetch one row from Access DB. From 1st april to current date 8th april if we give -3,-4,-5,-6, -7 this code but works small error is that "&lt;" &amp; ">" this only working "=" sign not working in this code ? </p>
  
  <p>Thanks a lot.</p>