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

Getting the date

Status
Not open for further replies.

csvideo

Programmer
Oct 19, 2001
74
BB
I have two computers on a network, each with a seperate EXE of a my VFP program. Machine 1 has the data and I use SET PATH TO on machine 2 to find the data on machine 1. My question is:
How can I get the date that is on machine 1 from machine 2?

thanx guys
 
The question is incomprehensible
Please describe the situation clearly ...
Thanks..
 
If U want to have the same date on the second computer U can set the proper date on the "Server" and record it into a table and set it on the second one "Station".
Hope this helps.
 
I'm working on machine 2 and I would like to get the date thats on machine 1 using VFP code. Is this question any better?


P.S
I was thinking about to ways of going it can anyone tell me if these ways can work

1.) Create a field in a table in the database thats on machine 1 with the default value set to DATE(). Then from machine 2 append a new record in the table and copy the field's value.


2.) Create a stored procedure in the database that returns the system date.

thanx guys
 
Hi Chrisman,
What you are thinking will not work. When you wrire DATE() in machine 1 from machine 2, the DATE() value is the same as machine2's date.

If you are thinking, you are going to ask some one to create a field from Unit1 or press some button in Unit1 to do this, and then read it from unit 2... it sounds bad... you can very well get the date by word and set it here.. No one intends to set the date differently between units.

However, there is possiblility to get this information.
1. Try some sort of API call.. I am not sure of this and dont want to suggest when I am not sure.
2. Try a low level file creation to be done by the unit2 in unit1 by unit1. Then read its creation date value.. then delete it.
I did not reply earlier, since I havent tried.. (The server/user units are not accesible for the moment.. my network card is out for upgrade). I can test and then post a reply as soon as I have completed my hardware setup.

I am not sure what happens when unit2 creates a file in Unit1.. is it getting the time stamp of unit1 or unit2.. I want to check this. If the time stamp is that of unit1, then we can do a ADIR of this file and capture that date.

You can note these ideas and tru yourself also. :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top