Display current time and date in VB
If you want to show time or date in any of your forms you can use this simple method to display. Codes:- (after double clicking on form1, you have to type this) Timer1.enabled=true ---------------------------------------------------------------------------- (after double clicking on timer you have to type this) Label1.text=Date.Now.Tostring("hh:mm:ss") Label2.text=Date.Now.Tostring("dd-MMM-yyyy")
If you want to show time or date in any of your forms you can use this simple method to display. Codes:- (after double clicking on form1, you have to type this) Timer1.enabled=true ---------------------------------------------------------------------------- (after double clicking on timer you have to type this) Label1.text=Date.Now.Tostring("hh:mm:ss") Label2.text=Date.Now.Tostring("dd-MMM-yyyy")