Date.AddYears : Date « System « VB.Net by API






Date.AddYears

  
 

public class Test
   public Shared Sub Main

        Dim Expiration As Date
        Dim NewExpiration As Date

        Expiration = #1/1/2005#
        Expiration.AddYears(3)
        NewExpiration = Expiration.AddYears(3)
        Console.WriteLine("The new expiration date is: " & NewExpiration)

   End Sub
End class

   
    
  








Related examples in the same category

1.New Date(Int year, Int month, Int day)
2.New Date(Int year, Int month, Int day, Int hour, Int minute)
3.Date.AddDays
4.Date.AddMilliseconds
5.Date.AddMonths
6.Date.DayOfYear
7.Date.Millisecond
8.Date.Parse
9.Date.ToLongDateString
10.Date.ToLongTimeString
11.Date.ToOADate
12.Date.ToShortDateString
13.Date.ToShortTimeString
14.Date.ToString
15.Date.ToUniversalTime
16.Date.op_Subtraction