Calculate total time with in/out data using C#
<p>How to write a C# code to calculate total InTime in Office with multiple in/out times given for a specific person on one particular day.I have a dropdown for selecting a person name and one calendar to select date on which I need to get the total InTime of an employee.</p>

<p>Data is like given below in an excel sheet xyz.:</p>

<pre><code> **Date          Event Description   Item Description**
12/21/2012 1:51 Exit granted    Ban Swapnil
12/21/2012 2:45 Entry granted   Ban Swapnil
12/21/2012 8:12 Exit granted    Ban Swapnil
12/25/2012 22:44    Entry granted   Ban Swapnil
12/26/2012 0:59 Exit granted    Ban Swapnil
12/26/2012 1:34 Entry granted   Ban Swapnil
12/26/2012 8:15 Exit granted    Ban Swapnil
12/26/2012 22:05    Entry granted   Ban Swapnil
12/26/2012 23:46    Exit granted    Ban Swapnil
12/21/2012 1:24 Exit granted    Bandel Ashish Chander
12/21/2012 15:23    Entry granted   Bandel Ashish Chander
12/21/2012 15:34    Exit granted    Bandel Ashish Chander
12/21/2012 15:51    Entry granted   Bandel Ashish Chander
12/21/2012 16:06    Exit granted    Bandel Ashish Chander
12/21/2012 16:29    Entry granted   Bandel Ashish Chander
12/21/2012 17:56    Exit granted    Bandel Ashish Chander
12/21/2012 18:32    Entry granted   Bandel Ashish Chander
12/21/2012 19:03    Exit granted    Bandel Ashish Chander
12/21/2012 19:37    Entry granted   Bandel Ashish Chander
12/21/2012 21:40    Exit granted    Bandel Ashish Chander
12/21/2012 21:50    Entry granted   Bandel Ashish Chander
12/21/2012 23:01    Exit granted    Bandel Ashish Chander
12/24/2012 13:39    Entry granted   Bandel Ashish Chander
12/24/2012 13:41    Exit granted    Bandel Ashish Chander
12/24/2012 14:52    Entry granted   Bandel Ashish Chander
12/24/2012 15:54    Exit granted    Bandel Ashish Chander
12/24/2012 16:41    Entry granted   Bandel Ashish Chander
12/24/2012 18:31    Exit granted    Bandel Ashish Chander
12/24/2012 22:07    Entry granted   Bandel Ashish Chander
12/24/2012 23:00    Exit granted    Bandel Ashish Chander
12/25/2012 14:00    Entry granted   Bandel Ashish Chander
12/25/2012 14:02    Exit granted    Bandel Ashish Chander
12/25/2012 14:48    Entry granted   Bandel Ashish Chander
12/25/2012 18:45    Exit granted    Bandel Ashish Chander
12/26/2012 13:14    Entry granted   Bandel Ashish Chander
12/26/2012 13:29    Exit granted    Bandel Ashish Chander
12/26/2012 14:33    Entry granted   Bandel Ashish Chander
12/26/2012 17:45    Exit granted    Bandel Ashish Chander
</code></pre>
