xHarbour Reference Documentation > Command Reference |
Sets the date format to include two or four digits.
SET CENTURY on | OFF | ( <lOnOff> )
The SET CENTURY command enables or disables the display of century digits. By using the four digit notation for a year, dates of any century can be input. While SET CENTURY ON displays the four digit notation, SET CENTURY OFF will hide the century digits and will only display the year without century.
The century information is not removed from date values. Only the display and input of date values is affected. Dates from 01/01/0100 to 12/31/2999 are supported.
See also: | CtoD(), CSetCent(), Date(), DtoC(), DtoS(), SET DATE, SET EPOCH, Set(), StoD() |
Category: | SET commands |
Source: | rtl\set.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// This example shows the result of the SET CENTURY command: PROCEDURE Main SET CENTURY OFF ? Date() // Result: 12/06/05 SET CENTURY ON ? Date() // Result: 12/06/2005 RETURN
http://www.xHarbour.com