Mega Code Archive

 
Categories / VB.Net Tutorial / Date Time
 

Compare Date value in If statement

Module Module1     Sub Main()         If (Now.Hour < 12) Then             Console.WriteLine("Good morning")         ElseIf (Now.Hour < 18) Then             Console.WriteLine("Good day")         Else             Console.WriteLine("Good evening")         End If     End Sub End Module Good evening