Connecting Tech Pros Worldwide Help | Site Map

Retrieve time from SERVER

Bill Agee
Guest
 
Posts: n/a
#1: Nov 12 '05
In my VBA code, I have the following:

Dim TimeIn as Date


TimeIn = Now()

' I would like to retrieve time from the Server clock rather than the local
PC clock.
' Any suggestions as to how this can be done?????????


Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Retrieve time from SERVER


On Thu, 20 Nov 2003 18:21:32 GMT, "Bill Agee" <wscs@mindspring.com>
wrote:
[color=blue]
>In my VBA code, I have the following:
>
>Dim TimeIn as Date
>
>
>TimeIn = Now()
>
>' I would like to retrieve time from the Server clock rather than the local
>PC clock.
>' Any suggestions as to how this can be done?????????
>[/color]
Try this to synch the local pc with another pc:

Shell Environ$("COMSPEC") & " /c Net Time \\yourservername /set /y"

- Jim


Closed Thread