I have two text boxes starttimeInput and endtimeInput that have regularexpression validators to only accept input of time variables (11:00 am, 12:15 pm, etc) and then a durationLabel where I want to calculate between the start time and end time and present it to the user as minutes.
Here is my code:
Partial Class _Default
Inherits System.Web.UI.Page
Public Overloads Function DateDiff(ByVal Interval As [ DateInterval | String ],
Dim duration, msg As DateTime
Dim secondDate As Date
Dim firstDate = starttimeInput.Text
secondDate = endtimeInput.Text
msg = durationLabel & DateDiff(DateInterval.Day, Now, secondDate)
MsgBox(msg)
End Function
Can anyone help me with this, because I've never written this type of function before and I'm kind of lost.
Thank you.