Controls the format in which dBASE displays the year portion of dates.

Syntax

SET CENTURY on | off

Description

When SET CENTURY is ON, dBASE displays dates in the current format with 4-digit years; when SET CENTURY is OFF, dBASE displays dates in the current format with 2-digit years.

You can enter a date with a 2-, 3-, or 4-digit year whether SET CENTURY is ON or OFF. dBASE assumes that 2-digit years are in the epoch designated by SET EPOCH, by default 1950. If SET CENTURY is OFF, dBASE truncates any digits to the left of the last two when displaying the date. However, dBASE stores the correct value of the date internally.

The following table shows the how dBASE displays and stores dates depending on the setting of SET CENTURY. (The table assumes SET DATE is AMERICAN and SET EPOCH is 1950.)

As the table shows, SET CENTURY doesn't affect the relationship between how you enter a date and how dBASE evaluates and stores it. SET CENTURY affects only how dBASE displays the year portion of the date.

 

 

You enter date as

dBASE
stores date as
YYYYMMDD

 

With SET CENTURY ON
dBASE displays

 

With SET CENTURY OFF
dBASE displays

{10/13/94}

19941013

10/13/1994

10/13/94

{10/13/994}

09941013

10/13/0994

10/13/94

{10/13/1994}

19941013

10/13/1994

10/13/94

{10/13/2094}

20941013

10/13/2094

10/13/94