Consultor Eletrônico



Kbase P7363: How to obtain the DATE and TIME of the Server machine
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/05/2008
Status: Verified

GOAL:

How to obtain the DATE and TIME of the Server machine

GOAL:

How to get the date and time of the DB host

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

Set the SESSION:TIME-SOURCE attribute to the name of the connected database that will be the source of date and time information.

This is an example of a program that display the values of the DATE and TIME of the local machine and the Server machine.:


/* remember to do the connect statement on a different .p file */

CONNECT SPORTS -1.

MESSAGE "Local PC Value " TODAY STRING (TIME, 'HH:MM:SS') VIEW-AS ALERT-BOX INFO BUTTONS OK.

SESSION:TIME-SOURCE = LDBNAME('SPORTS').

MESSAGE "Remote Value = DB Server " TODAY STRING (TIME, 'HH:MM:SS') VIEW-AS ALERT-BOX INFO BUTTONS OK.

SESSION:TIME-SOURCE = 'LOCAL'.

MESSAGE "Local PC Value " TODAY STRING (TIME, 'HH:MM:SS') VIEW-AS ALERT-BOX INFO BUTTONS OK.

DISCONNECT SPORTS.