How to calculate Time span in .Net

Here’s how to code the time span;

Function ExecuteLargeRec() {

DateTime d1 = DateTime.Now

DateTime d2

TimeSpan ts

‘ Your query here / processing

d2 = DateTime.Now

ts = d1.Subtract(d2)

MessageBox.Show(ts.ToString())

}

, , ,

  1. No comments yet.
(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed
  1. No trackbacks yet.

SetPageWidth