Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>set date</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET DATE


Syntax:     SET DATE AMERICAN/ANSI/BRITISH/FRENCH/GERMAN/ITALIAN

Purpose:    To set the format of the date type for display, date
            function arguments, and date function return values.

Options:    The default SETting is AMERICAN.

            Table: SET DATE Formats
            -------------------------------
               SETting        Format
            -------------------------------
               AMERICAN       mm/dd/yy
               ANSI           yy.mm.dd
               BRITISH        dd/mm/yy
               FRENCH         dd/mm/yy
               GERMAN         dd.mm.yy
               ITALIAN        dd-mm-yy
            --------------------------------

Usage:      SET DATE is a global SETting and affects the behavior of
            dates throughout an application program.  This allows you to
            control date formatting in a way that facilitates porting
            applications to foreign countries.

            To configure a compiled application to the proper date
            setting at runtime, pass a DOS environmental variable to
            your application program, retrieve its value with GETE(),
            and SET DATE with this value.  For example, in DOS:

               SET CLIP_DATE=BRITISH

            Later in the configuration section of your application
            program:

               SetDate(GETE("CLIP_DATE"))

            using the following procedure to actually SET DATE.

            PROCEDURE SetDate
            PARAMETER date_set

            IF date_set = "AMERICAN"
               SET DATE AMERICAN
            ELSEIF date_set = "ANSI"
               SET DATE ANSI
            ELSEIF date_set = "BRITISH"
               SET DATE BRITISH
            ELSEIF date_set = "FRENCH"
               SET DATE FRENCH
            ELSEIF date_set = "GERMAN"
               SET DATE GERMAN
            ELSEIF date_set = "ITALIAN"
               SET DATE ITALIAN
            ENDCASE

            RETURN


Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   SET DATE ANSI
   ? DATE()             && Result: 87.09.01

   SET DATE BRITISH
   ? DATE()             && Result: 01/09/87

   SET DATE FRENCH
   ? DATE()             && Result: 01/09/87

   SET DATE GERMAN
   ? DATE()             && Result: 01.09.87

   SET DATE ITALIAN
   ? DATE()             && Result: 01-09-87

   SET DATE AMERICAN
   ? DATE()             && Result: 09/01/87


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

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