Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Display System date & time to VB application

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-02-2009
Member
 
Join Date: Feb 2009
Posts: 12
Display System date & time to VB application
  

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?

Reply With Quote
  #2  
Old 16-02-2009
Member
 
Join Date: May 2008
Posts: 40
Re: Display System date & time to VB application

Code:
Text1.Text = Format(Now, "mm/dd/yyyy hh:mm:ss")
But u should put this in a timer and set the interval to 1000 if you want to
update it every second.
Reply With Quote
  #3  
Old 16-02-2009
Member
 
Join Date: May 2008
Posts: 115
Re: Display System date & time to VB application

Please refer to this!
http://www.thescripts.com/forum/thread738579.html

and

http://www.roseindia.net/tutorialsea...06.%20Tutorial

I hope this helps you!
Reply With Quote
  #4  
Old 16-02-2009
Member
 
Join Date: May 2008
Posts: 72
Re: Display System date & time to VB application

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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Display System date & time to VB application"
Thread Thread Starter Forum Replies Last Post
error message: cant login This computer date/time is not synchornize with the date/time of network fazalhassan Networking & Security 2 29-11-2011 08:29 AM
windows mobile:Installing an application - date and time eror Taryn Portable Devices 4 19-10-2010 06:55 AM
Every Time Windows application run it crashes.system.net.sockets.socket error jatender Operating Systems 2 06-08-2009 10:21 AM
How can I display system date & time on my webpage? JangoRap Software Development 3 16-02-2009 06:40 PM
Adjusting the Clock in Windows XP to display full Time and Date Gramm Windows XP Support 4 23-07-2008 06:54 AM


All times are GMT +5.5. The time now is 04:09 PM.