Calculate Time Duration
-
I want to enter out time of(02:42:15) with in time of(02:43:20)and see the duration of (00:01:05).Can any one send the code... It's Urgent. Thanks in advance:)
-
I want to enter out time of(02:42:15) with in time of(02:43:20)and see the duration of (00:01:05).Can any one send the code... It's Urgent. Thanks in advance:)
TimeSpan Diff = TimeSpan.Parse("02:43:15") - TimeSpan.Parse("02:42:20");
Best Regard Pathan---------------------------------------------------
-
I want to enter out time of(02:42:15) with in time of(02:43:20)and see the duration of (00:01:05).Can any one send the code... It's Urgent. Thanks in advance:)
Kasi Viswanathan wrote:
out time of(02:42:15) with in time of(02:43:20)
Try this :
TimeSpan T1=new TimeSpan(System.DateTime.Now.Day,System.DateTime.Now.Hour,System.DateTime.Now.Minute,System.DateTime.Now.Second,System.DateTime.Now.Millisecond); TimeSpan T2=new TimeSpan(System.DateTime.Now.Day,System.DateTime.Now.Hour,System.DateTime.Now.Minute,System.DateTime.Now.Second,System.DateTime.Now.Millisecond); string ans = T2.Subtract(T1).ToString();
Hope this will help you !!Regards, Abhi