SET DATE Set the date format for input and display ------------------------------------------------------------------------------ Syntax SET DATE FORMAT [TO] <cDateFormat> SET DATE [TO] AMERICAN | ansi | British | French | German | Italian | Japan | USA Arguments <cDateFormat> is a character expression that directly specifies the date format when the FORMAT clause is specified. <cDateFormat> must evaluate to a string of 12 or fewer characters. When specified, <cDateFormat> is analyzed to determine the proper placement and number of digits for the day, month, and year. The position of the day, month, and year digits is determined by scanning the string for one or more occurrences of the letters d, m, and y, respectively. Other characters in the string are copied verbatim into displayed date values. When FORMAT is not used, one of several keywords describes the date format. The following table shows the format for each keyword setting: SET DATE Formats ------------------------------------------------------------------------ SETting Format ------------------------------------------------------------------------ AMERICAN mm/dd/yy ANSI yy.mm.dd BRITISH dd/mm/yy FRENCH dd/mm/yy GERMAN dd.mm.yy ITALIAN dd-mm-yy JAPAN yy/mm/dd USA mm-dd-yy ------------------------------------------------------------------------ Description SET DATE is an environment command that sets the display format for date values. SET DATE is a global setting that affects the behavior of dates throughout a program, allowing you to control date formatting in a way that facilitates porting applications to foreign countries. Examples . In this example the FORMAT clause directly specifies the date format: SET DATE FORMAT "yyyy:mm:dd" . This example configures the date setting at runtime by passing a DOS environment variable to the program, retrieving its value with GETENV(), and setting DATE with the retrieved value: C>SET CLIP_DATE=dd/mm/yy In the configuration section of the application program, the date format is set like this: FUNCTION AppConfig SET DATE FORMAT TO GETENV("CLIP_DATE") RETURN NIL Files Library is CLIPPER.LIB.
See Also: CTOD() DATE() DTOC() DTOS() SET CENTURY SET EPOCH
Pingback: C5 UI Global Settings | Viva Clipper !
Pingback: C5 User Interface | Viva Clipper !
Pingback: C5 Commands | Viva Clipper !