C5_SET EPOCH

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.

     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



3 responses to “C5_SET EPOCH

  1. Pingback: C5 UI Global Settings | Viva Clipper !

  2. Pingback: C5 User Interface | Viva Clipper !

  3. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.