Consultor Eletrônico



Kbase P23635: Can Progress Display the time to the milliseconds?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/8/2008
Status: Unverified

GOAL:

Can Progress Display the current time to the milliseconds?

FACT(s) (Environment):

All Supported Operating Systems

FIX:

Progress' time function only counts to the second.

Example:

DISPLAY STRING(TIME,"HH:MM:SS").

If absolute time precision is not required, for example the format of output filenames, elapsed time can be appended with the ETIME function.

Example:

/*--------------------------------------------------------------*/
DEF VAR dd AS DATE NO-UNDO.
DEF VAR mylog AS CHAR NO-UNDO.
ETIME(YES).
dd = TODAY.

mylog = string(YEAR(dd)) +
string(MONTH(dd),"99") +
string(DAY(dd),"99") +
" " +
string(TIME,"hh:mm:ss") +
" " +
string(ETIME) +
".log.txt".

/* tidy up the string */
mylog = REPLACE(mylog, ":", "").
OUTPUT TO value(mylog) APPEND.
OUTPUT CLOSE.
/*--------------------------------------------------------------*/

Alternatively upgrade to OpenEdge 10.0A or above and use the MTIME function.
Please refer to Solution P123005, "Retrieving time to millisecond precision"