title: Search for month or year in a date using Linq based on condition
body: <p>I want to explain my situation first:</p>
  
  <p>I have a <code>DataTable</code> which is shown in a <code>DataGridView</code>. I also have a <code>Textbox</code> to search values in a specific column. For date values this looks like this (searchInDt is my DataTable, getSelectedItem is the column name and searchBox is the TextBox)</p>
  
  <pre><code>searchInDt.CaseSensitive = false;
  var rowSources = (from myRow in searchInDt
                                  .AsEnumerable()
                                  .Where(myRow =&gt; myRow.Field&lt;DateTime&gt;(getSelectedItem)
                                                      .ToString()
                                                      .StartsWith(searchBox.Text))
                    select myRow);
  
  if (rowSources.Any())
      dataGridView1.DataSource = rowSources.CopyToDataTable();
  </code></pre>
  
  <p>So this works but Now I have a <code>CheckBox</code> where I can choose between month and year. How does it work if I want to search from position 3 of a <code>DateTime</code> value (for month) or from position 6 (year)?<br>
  I tried Skip but this does not work. Even trying <code>EndsWith</code> (which would not be exactly that what I'm looking for) does not work.</p>