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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get DateTime off the server ?

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi All

I need to know the date time on the server, could someone tell me how to do this ?

many thanks
lou
 
Hi,
Hope this helps
This will synchronise your machine time with that of server.
I think this is what you require.


servername:='NTSERVER'; //here enter your server name
str:='NET TIME \\'+servername+' /SET /YES';
winexec(Pchar(str),0);


Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top