title: Calculate the hours in 2 different days excluding the sunday
body: <pre class="lang-cs prettyprint-override"><code> mydt1 = Convert.ToDateTime(dt.Rows[0].ItemArray[7].ToString());
  
   DateTime dt2 = DateTime.Now;
  
   var hours = (dt2 - mydt1).TotalHours;
  
   if (hours &gt;= 0) {
     txtElapse.Text = hours.ToString(&quot;0&quot;);
     var totals = hours * 2;
  
     txtFine.Text = totals.ToString(&quot;0&quot;);
   } else {
     txtFine.Text = &quot;0&quot;;
     txtElapse.Text = &quot;0&quot;;
   }
  </code></pre>
  <p>I'm creating a library system, and I'm working on the fine. However, I want to exclude every Sunday that passes on the timespan. I don't know how could I do it or what logic I can use.</p>