September 17, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Getting the Internet Time

  • November 19, 2002
  • By Karl Moore
  • Send Email »
  • More Articles »

We recently ran this little-known piece of code as a tip here on VB-World but here it is again in full Technicolor glory two functions allowing you to set your computer clock in code.

Public Sub SetDate(NewDate As Variant)    On Error Resume Next    DateTime.Date = NewDateEnd SubPublic Sub SetTime(NewTime As Variant)    On Error Resume Next    DateTime.Time = NewTimeEnd Sub

And that really is all. You know how to grab the data from time servers, you know how to change it into a real date and you now know how to set the computer clock. Und das ist alles, mon ami!





Page 5 of 6



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel