title: How to output DateTime array elements where DateTime is greater than
body: <p>I have two arrays, <code>UserActivity</code> and <code>UserDateTime</code>. User Activity array holds the activities of what the user is doing and the <code>UserDateTime</code> holds the DateTime of the said activity. I cannot find a solution where I can output the DateTime where it's greater than such Date/Time whilst printing out the user activity.</p>
  
  <p>For example:</p>
  
  <pre class="lang-none prettyprint-override"><code>[UserDateTime]      [UserActivity]
  02/02/2018 02:20    User logs on
  05/02/2018 15:20    User visits page
  20/02/2018 16:10    User goes here
  21/02/2018 12:00    User logs off
  21/02/2018 13:00    User logs on
  21/02/2018 15:00    User visits here
  
  </code></pre>
  
  <p>The Date and time has its own array (<code>UserDateTime</code>) while the users' activity is in the array <code>UserActivity</code>'.
  etc.</p>
  
  <p>My problem is that I can't programmatically output where the DateTime is greater than 20/02/2019 and the User Activity is linked to the date/time.</p>
  
  <p>My code is followed:</p>
  
  <pre class="lang-cs prettyprint-override"><code>string[] UserActivity = File.ReadAllLines(@"useractivityfile");
  string[] UserDateTime = File.ReadAllLines(@"userdatetimesfile");
  DateTime greaterthanthis = new DateTime(2018, 2, 20);
  for (int i = 0; i &lt; UserActivity.Length; i++)
  {
    if (DateTime.ParseExact(UserDT[i], "dd/MM/yyyy", CultureInfo.InvariantCulture) &gt; greaterthanthis)
    {
      Console.WriteLine(UserDT[i].Where(x &gt;= greaterthanthis????); //very stuck on this part
      //Also want to link the useractivity so Console.WriteLine(UserDT[i] + UserDT[i])
    }
  }
  </code></pre>
  
  <p>I've been overthinking and overcomplicating this code all week (stressed). Thank you for your help.</p>