By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,491 Members | 955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,491 IT Pros & Developers. It's quick & easy.

DATE & TIME LOAD TO THE FORM WITH RECORDING DATE & TIME EVENT

P: 20
Hi, Every Body
Following is code for Showing Actual Date & Time on the form and also record
Date & Time of an event. See the following and use Call Modified when you want to record an event in your program.

Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2. Dim Dt, Tm
  3.  
  4. ' Timer set interval=1000
  5.  
  6. Private Sub Timer1_Timer()
  7.   Label1.Caption = Date 'Real Date
  8.   Label2.Caption = Time 'Real Time
  9. End Sub
  10.  
  11. Sub Modified()
  12.   Dt = Label1.Caption   'Convert Event Date into Dt
  13.   Tm = Label2.Caption   'Convert Event Time into Tm
  14.   Label3.Caption = Dt   'Show DateModified
  15.   Label4.Caption = Tm   'Show TimeModified
  16. End Sub
  17.  
  18. Private Sub Command1_Click()
  19.   Call Modified
  20. End Sub
Thanks
Adeeb Raza
Nov 16 '07 #1
Share this Question
Share on Google+
1 Reply

Mohan Krishna
100+
P: 115
Hi, Every Body
Following is code for Showing Actual Date & Time on the form and also record
Date & Time of an event.
:
Adeeb Raza
Hi Adeeb Raza!

Very nice code. May this be useful for many people.

ThanQ
Nov 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.