- Version
- Download 66
- File Size 101.39 KB
- File Count 1
- Create Date March 8, 2016
- Last Updated March 8, 2016
Display Date and Time in Visual Basic .Net
Display Date and Time in Visual Basic .Net
Example program in visual basic.net that display the current date and time in a form
Source code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label2.Text = Date.Now.Date
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label3.Text = TimeOfDay.ToString("hh:mm:ss")
End Sub
End Class