Hour Function In VB.NET

How to use Hour Function?

Explanation

Hour Function

Hour Function in Visual Basic.net 2008 returns an integer value in the range 0 to 23 that represents the hour.
Syntax:

Hour(Expression)
Example:

Module Module1
Sub Main()
Console.WriteLine("Current hour as integer from 0-23 is::
" & Hour(Now))
Console.ReadLine()
End Sub
End Module

In the above Hour Function example, the current hour is represented in an integer value.

Visual Basic Tutorial


Ask Questions

Ask Question