>How can I get the server system date from my workstation?
>
>I made a small function in the stored procedure of my database, the function is as follows.
>
>FUNCTION GetServDate
> MESSAGEBOX(DATE())
> RETURN DATE()
>EndFunc
>
>But when I execute this function from a workstation I am getting that workstations system date and not the server date. Can someone help me on this?
The easiest way to do this is to create a small file on the server, read the file's date/time stamp, and erase the file - the date/time for a disk volume come from the host (server) not the client. There is also an API call RemoteTOD() that will retrieve the date/time from a remote system, but it works only under NT/2K/XP.
The easy way:
cMyFileName = '\\MyServer\MyShare\'+SYS(2015)
nFH=FCREATE(cMyFileName)
=FCLOSE(nFH)
=ADIR(aFileName,cMyFileName)
ERASE (cMyFileName)