SET EPOCH
Sets the base year for interpreting two-digit years in dates.
Syntax
SET EPOCH TO <expN>
Default
The default base year is 1950, yielding years from 1950 to 2049.
Description
Use SET EPOCH to change how two-digit years are interpreted. This allows you to keep SET CENTURY OFF, while enabling entry of dates that cross a century boundary. The following table shows how dates are interpreted using three different SET EPOCH settings:
Date |
1900 |
1930 |
2000 |
{5/5/00} |
05/05/1900 |
05/05/2000 |
05/05/2000 |
{5/5/30} |
05/05/1930 |
05/05/1930 |
05/05/2030 |
{5/5/99) |
05/05/1999 |
05/05/1999 |
05/05/2099 |
For example, if you SET EPOCH TO 1930, you can continue to use most applications with two-digit years unchanged well into the 21st century, (although you would no longer be able to enter dates before 1930, which would not be a problem with many applications). If your applications use dates that span more than one hundred years, then SET EPOCH alone will not help; you must SET CENTURY ON.
The base year setting takes effect whenever dates are interpreted. In programs, two-digit years in literal dates are evaluated at compile-time. If you use SET EPOCH, be sure it is set correctly when you compile code or run new or changed programs.
SET EPOCH is session-based. You may get the value of SET EPOCH with the SET( ) and SETTO( ) functions.