FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper set date format
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
set date format
Posted: Tue Nov 01, 2005 02:30 PM

I used browse class How can I set the date format for ctod() function ?

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: set date format
Posted: Tue Nov 01, 2005 03:09 PM

From the Clipper 5.3b Norton Guides:

SET DATE
Set the date format for input and display
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Syntax

 SET DATE FORMAT [TO] <cDateFormat>
 SET DATE [TO] AMERICAN | ansi | British | French
    | German | Italian | Japan | USA

Arguments

 <cDateFormat> is a character expression that directly specifies the
 date format when the FORMAT clause is specified.  <cDateFormat> must
 evaluate to a string of 12 or fewer characters.

 When specified, <cDateFormat> is analyzed to determine the proper
 placement and number of digits for the day, month, and year.  The
 position of the day, month, and year digits is determined by scanning
 the string for one or more occurrences of the letters d, m, and y,
 respectively.  Other characters in the string are copied verbatim into
 displayed date values.

 When FORMAT is not used, one of several keywords describes the date
 format.  The following table shows the format for each keyword setting:

 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
 JAPAN     yy/mm/dd
 USA       mm-dd-yy
 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

Description

 SET DATE is an environment command that sets the display format for date
 values.  SET DATE is a global setting that affects the behavior of dates
 throughout a program, allowing you to control date formatting in a way
 that facilitates porting applications to foreign countries.

Examples

 þ  In this example the FORMAT clause directly specifies the date
    format:

    SET DATE FORMAT "yyyy:mm:dd"

 þ  This example configures the date setting at runtime by passing
    a DOS environment variable to the program, retrieving its value with
    GETENV(), and setting DATE with the retrieved value:

    C>SET CLIP_DATE=dd/mm/yy

    In the configuration section of the application program, the date
    format is set like this:

    FUNCTION AppConfig
       SET DATE FORMAT TO GETENV("CLIP_DATE")
       RETURN NIL

Files Library is CLIPPER.LIB.

EMG

Continue the discussion