Hi,
I want to display date & time on the form of my Vb project & i need help about what is the best way to do this?
How should i refresh it?
Hi,
I want to display date & time on the form of my Vb project & i need help about what is the best way to do this?
How should i refresh it?
But u should put this in a timer and set the interval to 1000 if you want toCode:Text1.Text = Format(Now, "mm/dd/yyyy hh:mm:ss")
update it every second.
Please refer to this!
http://www.thescripts.com/forum/thread738579.html
and
http://www.roseindia.net/tutorialsea...06.%20Tutorial
I hope this helps you!
Place the Label on the form where you want the display to appear. Do you want the time to continuously update (say every minute?)
If you just want to have the current date and time when the form opens:
in the Form_Load event:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
MyDateandTimeLabel.Text = Date.Now.ToString("dd MMM yyyy hh:mm:ss")
End Sub
Bookmarks