Option Strict On
Public Class DateMembers
Public Shared Sub Main()
Dim dat As Date = New Date(2000, 1, 1)
Dim ts As New TimeSpan(30, 0, 0, 0)
Console.WriteLine("The original date is " & dat)
dat = dat.AddMonths(5)
Console.WriteLine("The new date is " & dat)
dat = dat + ts
Console.WriteLine("The new date is " & dat)
End Sub
End Class
The original date is 01/01/2000
The new date is 01/06/2000
The new date is 01/07/2000