Printer Version Table of Contents Project Home Page
.PARAMETER...: /I - Input Date Formats
.CATEGORY....: parameters
.DISCUSSION..:
For a list of the symbols used in specifying fixed date formats, see APPENDIX Symbols used in Date Formats


ABSOLUTE DATE -- day#

Returns the "absolute date", that is, the date expressed as the number of days since the beginning of the calendar.

ABSOLUTE TIME -- minute#

Returns the "absolute minute", that is, the time expressed as the number of minutes since midnight, January 1, 1990.


FILE DATE/TIME STAMP -- /IF

Input format F (file) tells Fdate that /A and /B will specify filenames, and that Fdate should pick up the input date and time from the date/time stamp on a file.

   Fdate /Ff /If /Afilex.txt /P"FILEX.TXT last updated: " /Ofull
Note that if you specify /If, then both /A and /B will be interpreted as filenames.

Because the input format applies to both /A and /B parms, it is not possible to put a filename in /A and a date literal in /B, and then (say) use the "comp" or "dif" function to compare them. You must first extract the file's date into an environment variable, and then compare that environment variable to the date literal.

The only exception to this rule is the pseudodate "t" (i.e. /At or /Bt) which will pick up the current date and time from the system clock. This feature will allow you, for example, to compare the date of a file to today's date (see EXAMPLES).

A filename may (but need not) be fully qualified: i.e. "FooBar.1" and "C:\DBASE\WORKDIR\FooBar.1" are both acceptable.

A filename may contain wildcards, but only if there is only one file that matches the wildcard. If Fdate finds more than one file that matches the filespec, it will return an error message.

CALENDAR DATE INPUT FORMATS

 FORMAT      EXAMPLES      DISCUSSION
 ------      --------------------------------------
 ccyymmdd    19922002
   yymmdd      922002     Century will be assumed.
see Topic Fdate's Century-Assumption Algorithm


On the /I (input format) parm, the separator character of the following input formats must be a dash. This simply tells Fdate that the input date will contain SOME separator character. The separator character that actually occurs in dates in the /A and /B parms is ignored, and may be any non-numeric character: a slash "/", a dash "-", a dot ".", etc.

In specifications that begin with "mm-dd" or "dd-mm", leading zeros need not be present in the "mm" and "dd" part of the date.

ccyy-mm-dd  1992-02-20    Leading zeros MUST be present, since the
            1992/02/20    date does not begin with dd-mm or mm-dd.
            1992.02.20

  yy-mm-dd    92-02-20    Leading zeros MUST be present, since the
              92/02/20    date does not begin with dd-mm or mm-dd.
              92.02.20    century is assumed
:see Topic Fdate's Century-Assumption Algorithm


mm-dd-ccyy  02-20-1992
            02/20/1992    The dash represents ANY non-numeric character.

             2-5-1992     Leading zeros need not be present.
             2/5/1992

mm-dd-yy    02-05-92      February 5, 1992.
             2/5/92       century is assumed.
:see Topic Fdate's Century-Assumption Algorithm

                          ---------------------------------------
                          In the following formats, days
                          precede months  (European style)
                          ---------------------------------------

dd-mm-ccyy  05-02-1992
            05/02/1992

             5-2-1992     Leading zeros need not be present.
             5/2/1992

dd-mm-yy    05-02-92      February 5, 1992.
             5/2/92       century is assumed.
see Topic Fdate's Century-Assumption Algorithm



BUSINESS JULIAN DATE INPUT FORMATS

These are formats for "business Julian" dates: dates expressed as the number of days from the beginning of the year, when January 1 is day 1.

.EXAMPLES....:
      date      BUSINESS JULIAN DATE
  -----------   --------------------
  Jan  5, 1992  92005
  Jan  5, 1993  93005
  Dec 31, 1993  93365  [Dec 31 is 365th day of year 1993]
  Dec 31, 1996  96366  [Dec 31 is 366th day, because 1996 is a leap year]

-----------------------------------------------------------------------
 NOTE:
 * JJJ can be 1 - 5 digits
 * may include a prefix of a plus or minus ( + or - ) sign
-----------------------------------------------------------------------

FORMAT      EXAMPLES      DISCUSSION
------      --------- -----------------------------
ccyyjjj     1992003       Third day of 1992,
i.e. Jan 3, 1992
            19923         Third day of 1992
            tttt003       Third day of this year
            tttt3         Third day of this year

  yyjjj       92003       Third day of 1992
              923         Third day of 1992
              tt003       Third day of this year
              tt3         Third day of this year
              01003       Third day of 2001
see Topic Fdate's Century-Assumption Algorithm

NOTE THAT Fdate WILL ACCEPT "JJJ" OF LESS THAN 1 & MORE THAN 366.
-----------------------------------------------------------------

  yyjjj       tt1000      the 1000th day from beginning of this year
              tt0         last day of last year
              tt-1        next-to-last day of last year
 Fdate /Ff /Iccyyjjj /Od1 /A1992-1  produces... Monday December 30, 1991
 Fdate /Ff /Iccyyjjj /Od1 /A19920   produces... Tuesday December 31, 1991
 Fdate /Ff /Iccyyjjj /Od1 /A1992+1  produces... Wednesday January 1, 1992

 Fdate /Ff /Iccyyjjj /Od1 /A1992366 produces... Thursday December 31, 1992
 Fdate /Ff /Iccyyjjj /Od1 /A1992367 produces... Friday January 1, 1993

This feature allows limited date arithmetic with ordinary business Julian
days.  For example, 90 days from tt300 can be shown by:

                  Fdate /Ff /Iyyjjj /Att390