Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - ax_servertime() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_ServerTime()
 Retrieves the current time and date from the server via the Advantage
 Database Server
------------------------------------------------------------------------------

 Syntax

     AX_ServerTime( <dServerDate>, <cServerTime> ) -> logical

     <dServerDate>   Returned date value containing the current date on
     the server. The date is returned according to the current date format.
     Note that this is an output parameter. It must be passed by reference
     (i.e. a `@' must precede the actual parameter).

     <cServerTime>   Returned string value containing the current time on
     the server in an HH:MM:SS 24-hour format. Note that this is an output
     parameter. It must be passed by reference (i.e. a `@' must precede the
     actual parameter).

 Returns

     Returns a logical .T. if the operation was successful, else returns .F.
     If an error occurred, AX_Error() will return information on why the
     function failed.

 Description

     AX_ServerTime returns the current date and time from the server. The
     time is returned string value formatted in 24-hour time with hours,
     minutes, and seconds (HH:MM:SS). The date is returned according to the
     current date format. AX_ServerTime is useful if the Advantage client
     application is running at a site that is in a different time zone than
     where the data is located. When Advantage is used in a WAN environment
     or is being used with the Advantage Internet Server, the Advantage
     client and Advantage server will often be located in different time
     zones. This API allows the application to obtain a consistent date
     and time, that is, the date and time of the server location.

 Example

     USE test VIA "DBFCDXAX"

     ? "Client date: ", date() // Displays the current date on the client PC
     ? "Client time: ", time() // Displays the current time on the client PC

     ? lResult := AX_ServerTime( @dDate, @cTime ) // Returns .t. if success

     ? "Server date: ", dDate // Displays the current date on the server PC
     ? "Server time: ", cTime // Displays the current time on the server PC


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson