Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim
Time1 As TimeSpan
Dim
Time2 As TimeSpan
Dim
Difference As TimeSpan
'Get the
current system time...
Time1 = Date.Now.TimeOfDay
'Wait a
couple of seconds...
MsgBox("Wait
here")
'Get the
current system time...
Time2 = Date.Now.TimeOfDay
'Find the
difference between Time2 and Time1
Difference = Time2.Subtract(Time1)
MsgBox(Difference.ToString)
End Sub
Dim d As
Date
d = CType("
Private Sub Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button1.Click
Dim MyDate As New DateTime(2003, 10, 21)
'NOTE: MM/dd/yyyy is CASE SENSITIVE !!!
MessageBox.Show(MyDate.ToString("MM/dd/yyyy"))
End Sub
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim d As Date
d = #1/1/2003#
MsgBox(d.AddYears(1))
MsgBox(d.AddDays(45))
End Sub