Printer Version Table of Contents Project Home Page
.PARAMETER...: /C - Custom Output Date Formats
.CATEGORY....: parameters
.DISCUSSION..:
The CUSTOM OUTPUT FORMAT parameter (/C) is designed to be more flexible than Fdate's original OUTPUT DATE FORMAT parameter (/O). You may specify the /C parameter in conjunction with any Fdate function that produces a date or time as its output. The /C parm allows you to specify any desired output string, with components of the date and time inserted into the string in any place where they are desired.

The first character of the /C parm is taken to be the character that you want to use as the ESCAPE CHARACTER. Starting with character 2, the string specified on the /C parm is processed.

When an escape character is found, the next character will be processed as an INSERT CODE -- a character that indicates that a special value is to be inserted into the output string. If the INSERT CODE is the same as the escape character, the escape character is inserted. Otherwise, one of the following values is inserted. Note that these values for the insert code are case-sensitive. Upper-case and lower-case codes are related, with the lower-case code inserting a string that is generally shorter than the one inserted by the upper-case code.

DEBUGGING TIP

If you are having problems with your custom output format, make sure that the first character in the /C parm is the escape character. If the first thing in your output string is an insert code, then the string should start with TWO escape characters, one to define the escape character, and one to identify the insert code. For instance, to produce the current 4-digit year, you would code:

    fdate /ff  /c"~~Y"



The results of an escape character followed by any other character are undefined. (This is to allow for the addition of future insert codes.)

.EXAMPLE.....:
   (The tilde "~" is used as the escape character)
   On April 4, 1999, the following statement:
      Fdate /Ff /c"~Today is ~W, ~N ~d, ~Y (ISO date ~Y-~M-~D)"
   produces: "Today is Sunday, April 4, 1999 (ISO date 1999-04-04)"

.NOTE........:
The names of the days and the months are controlled by the language parameter (/L), and will vary with the language. For examples, run CUSTOM.BAT.