title: C# LINQ to object and filter for periods
body: <p>IN LINQ there is no any between operator. so how to use LINQ to extract data between two periods?
  How to extract all periods from period 2010 FYA to 3Q 2014A using LINQ?</p>
  <p><strong>First i tried this way</strong></p>
  <pre><code> List&lt;string&gt; periods = new List&lt;string&gt;();
   periods.Add(&quot;2010 FYA&quot;);
   periods.Add(&quot;2011 FYA&quot;);
   periods.Add(&quot;2012 FYA&quot;);
   periods.Add(&quot;2013 FYA&quot;);
   periods.Add(&quot;1Q 2014A&quot;);
   periods.Add(&quot;2Q 2014A&quot;);
   periods.Add(&quot;3Q 2014A&quot;);
   periods.Add(&quot;4Q 2014A&quot;);
   periods.Add(&quot;2014 FYA&quot;);
  
   var xx = periods.Where(a =&gt; a.ToString() == &quot;2010 FYA&quot; &amp;&amp; a.ToString() == &quot;3Q 2014A&quot;).ToList();
  </code></pre>
  <p><strong>2nd way</strong></p>
  <pre><code>    List&lt;string&gt; periods = new List&lt;string&gt;();
      periods.Add(&quot;2010 FYA&quot;);
      periods.Add(&quot;2011 FYA&quot;);
      periods.Add(&quot;2012 FYA&quot;);
      periods.Add(&quot;2013 FYA&quot;);
      periods.Add(&quot;1Q 2014A&quot;);
      periods.Add(&quot;2Q 2014A&quot;);
      periods.Add(&quot;3Q 2014A&quot;);
      periods.Add(&quot;4Q 2014A&quot;);
      periods.Add(&quot;2014 FYA&quot;);
  
      var xx = periods.Where(a =&gt; RemoveMiddleSpace(a.Replace(&quot;A&quot;, &quot;&quot;).Replace(&quot;E&quot;, &quot;&quot;).Replace(&quot;FY&quot;, &quot;&quot;).Replace(&quot;Q&quot;, &quot;&quot;)) 
          == RemoveMiddleSpace(&quot;2010 FYA&quot;.Replace(&quot;A&quot;, &quot;&quot;).Replace(&quot;E&quot;, &quot;&quot;).Replace(&quot;FY&quot;, &quot;&quot;).Replace(&quot;Q&quot;, &quot;&quot;))
          &amp;&amp; RemoveMiddleSpace(a.Replace(&quot;A&quot;, &quot;&quot;).Replace(&quot;E&quot;, &quot;&quot;).Replace(&quot;FY&quot;, &quot;&quot;).Replace(&quot;Q&quot;, &quot;&quot;))
          == RemoveMiddleSpace(&quot;3Q 2014A&quot;.Replace(&quot;A&quot;, &quot;&quot;).Replace(&quot;E&quot;, &quot;&quot;).Replace(&quot;FY&quot;, &quot;&quot;).Replace(&quot;Q&quot;, &quot;&quot;))).ToList();
  </code></pre>
  <p>those two did not get me expected output. i know if i can convert my period to date then it would be possible. how to convert my period to right date?</p>