set date format

set date format

Postby Ehab Samir Aziz » Tue Nov 01, 2005 2:30 pm

I used browse class How can I set the date format for ctod() function ?
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Re: set date format

Postby Enrico Maria Giordano » Tue Nov 01, 2005 3: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
User avatar
Enrico Maria Giordano
 
Posts: 8388
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 4 guests