How to add Date and Time in Visual Basic

Use this board to post your code snippets - tips and tricks
1 post Page 1 of 1
Contributors
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

Hi everyone its me Robby1998 again and in this topic i will show u how to add time and date in your application

Needed Items for time:
Timer
Label

this is the code for the time, put this code on timer_tick event after enabling the timer!
Code: Select all
label1.text = timeofday

Needed Items for date:
Timer
Label

this is the code for the date, put this code also in the timer_tick event after enabling it
Code: Select all
label1.text=System.DateTime.Today.ToLongDateString



ty and regards,

Robby1998
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
1 post Page 1 of 1
Return to “Quick Snips”