Hello
,
I'll presume that you have both times as DateTime objects. If not, you'll need to parse them and then call the Subtract method to get a TimeSpan object.
TimeSpan span = dt.Subtract(dt2);
int seconds = span.Seconds;
> Hello,
>
> I need to know how I can calculate the number of seconds between two
> time stamps, e.g. if I have the following (using ToLongTimeString)
>
> 8:28:21 PM
>
> and
>
> 9:02:33 PM
>
> How can I find out the number of seconds elapsed between the two
> times?
>
> Thanks in advance.
>
> Asad
>
--
--
Matt Berther
http://www.mattberther.com