Command SET TIME Foundation

Sets the display format for the system time

Syntax
SET TIME TO HH:MM:SS | hh:MM:SS | hh:MM:SSTT | SYSTEM
Scope
thread-local
Parameters
HH:MM:SS
Selects the 24h format for the system time.
hh:MM:SS
Selects the 12h format for the system time.
hh:MM:SSTT
Selects the 12h format for the system time and displays a marker for AM and PM.
Description

The command SET TIME defines the display format for the system time. If the format is set to hh:MM:SSTT, time markers set with the function SetLocale() are displayed for morning (AM) and afternoon (PM).

The default time format is defined by the operating system setting.

Examples
Define the display format for the system time
// The example changes the display format of the system time. 
// The time must be > 12:00h for the changed format to become 
// recognizable. 

#include "Nls.ch" 

PROCEDURE Main 

   CLS 
   SetTimerEvent( 100, {|| DispOutAt( 0, 0, Time() ) } ) 

   WAIT "Press a key to switch to 12h format..." 

   SET TIME TO hh:MM:SS 

   WAIT "Press a key to display time markers..." 

   SetLocale( NLS_S1159, "am" ) 
   SetLocale( NLS_S2359, "PM" ) 

   SET TIME TO hh:MM:SSTT 

   WAIT 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.