<p>I have a .net 2.0 ascx control with a start time and end time textboxes. The data is as follows: </p>

<p>txtStart.Text = 09/19/2008 07:00:00</p>

<p>txtEnd.Text = 09/19/2008 05:00:00</p>

<p>I would like to calculate the total time (hours and minutes) in JavaScript then display it in a textbox on the page. </p>

Once your textbox date formats are known in advance, you can use
Matt Kruse's Date functions
in Javascript to convert the two to a timestamp, subtract and then write to the resulting text box.
Equally the
JQuery Date Input
code for
```
stringToDate
```
could be adapted for your purposes - the below takes a string in the format "YYYY-MM-DD" and converts it to a date object. The timestamp (
```
getTime()
```
) of these objects could be used for your calculations.
```
```
stringToDate: function(string) {
    var matches;
    if (matches = string.match(/^(\d{4,4})-(\d{2,2})-(\d{2,2})$/)) {
       return new Date(matches[1], matches[2] - 1, matches[3]);
    } else {
       return null;
    };
}
```
```