title: DataTable Select by exact DateTime
body: <p>I have a DataTable <code>xData</code> which has a <code>DateTime</code> column with millisecond accuracy, I need to extract the rows which match an exact time with milliseconds but cannot get the syntax correct.</p>
  
  <p>I've tried</p>
  
  <pre><code>DateTime dt = timeStampList[i];
  string str = dt.ToString("yyyy-MM-dd HH:mm:ss.fff");
  DataRow[] result = xData.Select("TimeStamp2 = " + str);
  
  foreach (DataRow row in result)
  {
      Console.WriteLine("{0}, {1}", row[0], row[1]);
  }
  </code></pre>
  
  <p>but </p>
  
  <pre><code>DataRow[] result = xData.Select("TimeStamp2 = " + str);
  </code></pre>
  
  <p>causes an error:</p>
  
  <blockquote>
    <p>Syntax error: Missing operand after '16' operator.</p>
  </blockquote>
  
  <p>I've searched but most of the examples only show how to select by date and not a full <code>datetime</code> with milliseconds.</p>