I am trying to return the difference in minutes from a starttime and stoptime
using the datediff function in a Web Project with VB.Net
With:
StartTime = 2/10/2006 8:46:03 PM
EndTime = 2/10/2006 8:48:10 PM
I am getting a return value of 1054586688 in the diff variable
I tryed this same code in a Windows.Net Project and I get a return of 2 as I
would expect.
Can someone tell me what I need to do in a Web Project to make this simple
code work?
Code from Web Project
==================
Partial Class _Default
Inherits System.Web.UI.Page
Dim StartTime As Date
Protected Sub btnStartTime_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnStartTime.Click
StartTime = Now
lblStartTime.Text = StartTime
End Sub
Protected Sub btnStopTime_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnStopTime.Click
Dim EndTime As Date = Now
lblStopTime.Text = EndTime
Dim Diff As Integer = DateDiff(DateInterval.Minute, StartTime,
EndTime)
txtTime.Text = Diff
End Sub
End Class