Key word | Date format |
---|---|
AMERICAN | mm/dd/yy (American) |
ANSI | yy.mm.dd (ANSI) |
BRITISH | dd/mm/yy (British) |
FRENCH | dd/mm/yy (French) |
GERMAN | dd.mm.yy (German) |
ITALIAN | dd-mm-yy (Italian) |
JAPAN | yy/mm/dd (Japanese) |
SYSTEM | Date format from the operating system |
USA | mm-dd-yy (USA) |
Command SET DATE Foundation
Defines the date format for input and output.
SET DATE FORMAT [TO] <cDateFormat>
SET DATE [TO] SYSTEM
| american | ansi | british | french
| german | italian | japan | usa
The command SET DATE defines the application-wide date format for the display of date values. The country specific default setting for the date format is predetermined in DBESYS.PRG when Database Engines are loaded. The call SET DATE TO SYSTEM selects the operating system's date format.
// In the example, the date format is defined using a
// character string and is reset to the system format
// at the end.
PROCEDURE Main
SET DATE FORMAT TO "dd.mm.yyyy"
SET CENTURY ON
? Date() // result: 06.12.1994
? DtoS( Date() ) // result: 19941206
SET DATE FORMAT TO "yyyymmdd"
? Date() // result: 19941206
SET DATE TO SYSTEM
RETURN
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.