DateTime.Year : DateTime « System « VB.Net by API






DateTime.Year

  
Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())
       Dim currentTime as System.DateTime = System.DateTime.Now
       Console.WriteLine("currentTime Year :" & currentTime.Year)
       Console.WriteLine("currentTime Month:" &  currentTime.Month)
       Console.WriteLine("currentTime Date:" & currentTime.Date)
       Console.WriteLine("currentTime Hour:" & currentTime.Hour)
       Console.WriteLine("currentTime Minute:" & currentTime.Minute)
       Console.WriteLine("currentTime Second:" & currentTime.Second)
    End Sub
End Class

   
    
  








Related examples in the same category

1.New DateTime
2.DateTime.DayOfWeek
3.DateTime.IsLeapYear
4.DateTime.Second
5.DateTime.Subtract
6.DateTime.ToUniversalTime()
7.DateTime.UtcNow()