Author: dougancil | Posted on: 10/13/2010 10:20:31 AM | Views : 299

I have two text boxes called starttime and endtime which are datetime sqldbtypes that I want to subtract the value to show in a duration label. I know that you can do a subtraction with datediff in t-sql to find the time difference, and I'm wondering if that's the best way to approach this. Here is the code from my default.aspx.vb page:


Imports System.Data.SqlClient Imports System.Data Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click InsertRow() End Sub Public Sub ClearFields() OperatorDropdown.SelectedIndex = -1 exceptiondateInput.Text = "" starttimeInput.Text = "" endtimeInput.Text = "" durationInput.Text = "" code.SelectedIndex = -1 Approvedby.SelectedIndex = -1 End Sub Publi ...

Go to the complete details ...