C#: calculating time diff
<p>using the following:- </p>

<pre><code>TimeSpan diff = dt2.TimeOfDay - dt1.TimeOfDay;
</code></pre>

<p>d1, d2 are 2 variables of type <code>DateTime</code> and they have got values in them</p>

<p>Now I want to check if there's a difference of 12 hours b/w them</p>

<pre><code>if(diff&gt;12)

{
//do stuff
}
</code></pre>

<p>now of course it wont wont coz 12 is an int..so how do I check if the time is more than 12 hrs or not ?? need help with this if statement only..thnx</p>
