none
How to calculate Difference of time between two DateTimePicker RRS feed

  • Question

  • Hi

    can any one tell me

    how to calculate difference of time between two datetimepickers and assign the result to the any other controls (label, text, datetimepicker) .. in VS,NET 2005

    Monday, January 8, 2007 6:03 AM

Answers

  • you could use a timespan:

    TimeSpan result = this.dateTimePicker2.Value - this.dateTimePicker1.Value;

    this.label.Text = result.ToString();

    Monday, January 8, 2007 7:19 AM
    Moderator