Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get time from server

Status
Not open for further replies.

eyeconz

IS-IT--Management
Nov 26, 2001
1
US
Does anyone know of a way to return the time from a different machine? I have some employee's that have learned to change the time on their local machine's to manuplate time stamps.
 
Set up a connection to your backend database and get the time from it.

Dim cn As New Connection
Dim rs As New Recordset
Dim connString As String
Dim sql1 As String
connString = "provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\\bigtuna\databases\bank.mdb;" & _
"Persist Security Info=False"

cn.ConnectionString = connString
cn.Open connString

sql1 = "select Now() "

rs.Open sql1, cn, adOpenStatic, adLockOptimistic

Debug.Print rs(0)
rs.close
set rs = nothing
set cn = nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top