You may set first the TIME and DATE of your system i mean you computer because there are some cases that the time and date in your computer is not set so may set first before doing some actions inyour visual basic 6.0.
Getting the time and Date in your computer basically its very easy.
First is to put two labels in your form label1 and label2 that is the name of the two labels and then after that i want you put 1 command button inside you form which is command1. And double click your command button put this code inside command1_click() label1.caption is equal to Date and lablel2.caption is equal to Time after that run your program and try to click your command button and it will automatically appear the time and date. You can download my example below.. Thats all!
You can download my example below.
Download File
Thank you buddy!
ReplyDeleteNo problem.. be follower of my blog..
ReplyDeleteit can display the time but no interval hahhahaha
ReplyDeletehow
ReplyDeletedont work
what about dtpicker??
ReplyDeletehow can you pick a date and time and display it in the datagrid???
_meSTIer_
how do i write coding for the time difference using vb program for example using the 24-hours format, from 1800hours to 2000hours(the difference is 2 hours) and from 2300hours to 0400hours(the difference is 5 hours)?
ReplyDeletep/s: help me A.S.A.P
bay maaung adlaw bag-o paman gud ko sa vb6 ma ngutana unta ko kung unsaon pag capture sa time kay nag himo man gud ko ug payroll system. tapos un na lang ang akong problema.. hope you can help me with this problem. tnx poh..
ReplyDeletetaga Cagayan pud ko. Sa Carmen amoa..
>Aaron
@Aaron:
ReplyDeleteExample you have label1.
label1.caption = time
label1.caption = date
how can i show the date without the button???
ReplyDeletei wanna use form_load
Private Sub Form_Load()
ReplyDeletelabel1.caption = time
label1.caption = date
End Sub
Private Sub Timer1_Timer()
ReplyDeleteLabel1.Caption=FormatDateTime(Now, vbLongDate)
Label2.Caption=FormatDateTime(Now, vbLongTime)
End Sub
how can i see the time counting ..?
ReplyDeletehow to create automatic time and date in vb
ReplyDeletebobo
ReplyDeletefix ung oras d gumagalaw
ReplyDeletejust add timer. change interval to 1000
Deleteex:
Private Sub Timer3_Timer()
label1.Caption = Time
End Sub
nice i've got idea
ReplyDeleteYou need to add a timer control to make your time and date moving. Set time interval to 1000.
ReplyDeletebrod meron kang sample vb code for DTR? log in, for AM, noon break out and in, then log out for afternoon. tapos generates reports after a day or a week...
ReplyDeletemeroon po bang code pag CLICK mo mag kakapture sa LABEL ung time and date?
ReplyDeleteparang DTR pag Pasok mo at Pag labas mo ay mayroong mag ka-capture sa label box.. (REX STUDENT PO AKO NEED HELP)
time interval sample
ReplyDeletePrivate Sub Timer1_Timer()
lblTime.Caption = FormatDateTime(Now, vbLongTime)
Timer1.Interval = 1000
End Sub
call the Timer1_Timer in your form_Load() so that the time will be visible
how to display the date which is stored in database onto a label ?
ReplyDelete