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

time from other computer

Status
Not open for further replies.

marvinjmd

Programmer
Jan 23, 2003
68
US
the computers of my office are conected trhu a hub... recently the manager ask to change the puchclock sytem i made so every emplye can set there in & out time ruunig the app form his own computer so i need to read the time from the computer that it will be the server.... i mean... how i can read the time for one of the computer in a hub-type-conected net???

tanx in advance
 
Have you tried using NET TIME \\SERVERNAME /SET command from DOS? You can run a DOS command from a VFP app; search for it in FAQ to run a DOS command effectivily.

Hope this helped.


kilroy [trooper]
philippines
"and that's what we call creativity..."
 
sorry i forgot to say we dont have server... all the computers are conected one by one trhu a hubb... its there something i can do to get the time for another comp in that kind of net???
 
In that case you may use any computer name in replacement for the servername.


kilroy [trooper]
philippines
"and that's what we call creativity..."
 
i forgot to say, add /YES at the end of the command so it will make NET TIME \\SERVERNAME /SET /YES

kilroy [trooper]
philippines
"and that's what we call creativity..."
 
great.... ok... tanx ... but how i can assign that time to a variable??.. thats because want to use that time to mark it as the time the employe check in/out??... its that possible???
 
once you sync the time of your pc w/that of another, you may use any VFP date/time functions like DATE(), TIME(), DATETIME(); all of which are native to VFP. there are also good tips of date/time calc in the FAQ area.


kilroy [trooper]
philippines
"and that's what we call creativity..."
 
Jorge,
There are also two FAQs you might want to check out -
"A function to synchronize your Local-System-Time to your Server-System-Time?" faq184-3505

"Alternate Method to Set local Time from Server" faq184-3536

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top