Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>set epoch</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET EPOCH
 Control the interpretation of dates with no century digits
------------------------------------------------------------------------------
 Syntax

     SET EPOCH TO <nYear>

 Arguments

     TO <nYear> specifies the base year of a 100-year period in which all
     dates containing only two year digits are assumed to fall.

 Description

     SET EPOCH is an environment command that determines the interpretation
     of date strings containing only two year digits.  When such a string is
     converted to a date value, its year digits are compared with the year
     digits of <nYear>.  If the year digits in the date are greater than or
     equal to the year digits of <nYear>, the date is assumed to fall within
     the same century as <nYear>.  Otherwise, the date is assumed to fall in
     the following century.

     The default value for SET EPOCH is 1900, causing dates with no century
     digits to be interpreted as falling within the twentieth century.

     CA-Clipper supports all dates in the range 01/01/0100 to 12/31/2999.

 Examples

     .  This example shows the effects of SET EPOCH:

        SET DATE FORMAT TO "mm/dd/yyyy"
        ? CTOD("05/27/1904")          // Result: 05/27/1904
        ? CTOD("05/27/67")            // Result: 05/27/1967
        ? CTOD("05/27/04")            // Result: 05/27/1904
        //
        SET EPOCH TO 1960
        ? CTOD("05/27/1904")          // Result: 05/27/1904
        ? CTOD("05/27/67")            // Result: 05/27/1967
        ? CTOD("05/27/04")            // Result: 05/27/2004

 Files:  Library is CLIPPER.LIB.

See Also: CTOD() DATE() DTOC() DTOS() SET CENTURY SET DATE

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson