bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DateSerial# Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
DateSerial# returns a serial number that represents the date of the
arguments.
DateSerial# (year%, month%, day%)
■ The year% values 0-178 can be used for the years 1900-2078. For all
other years, use the complete 4-digit year (for example, 1800).
■ Arguments outside of the ranges shown on the Syntax screen are
evaluated to calculate a valid date. For example:
TheDate# = DateSerial#(89, 13, 1)
The month% argument of 13 evaluates to the first month of the next
year: January 1, 1990.
■ Values that equate to a serial number outside of the range of
-53688 to 65380 produce the error message, "Illegal function call."
This translates to an actual date range of January 1, 1753 to
December 31, 2078 inclusive.
■ You can use negative numbers as arguments. For example, to find the
serial number for the date one week before 9/1/89, you could use:
DateSerial#(89,9,1-7)
Usage Note
■ For information on serial numbers, see ◄Serial Numbers►.
Important
■ To use DateSerial# in the QBX environment, use the DTFMTER.QLB
Quick library. To use DateSerial# outside the QBX environment, link
your program with the appropriate DTFMTxx.LIB file. Depending on
the compiler options you chose when you installed BASIC, one or
more of the following files will be available:
Filename Compiler options
════════════ ═════════════════════════════════════════════
DTFMTER.LIB 80x87 or emulator math; DOS or OS/2 real mode
DTFMTAR.LIB Alternate math; DOS or OS/2 real mode
DTFMTEP.LIB 80x87 or emulator math, OS/2 protected mode
DTFMTAP.LIB Alternate math; OS/2 protected mode
■ The DATIM.BI header file contains the necessary function
declarations for DateSerial#.
■ For more information on using libraries, see "Creating and Using
Quick Libraries" and "Using LINK and LIB" in the BASIC Programmer's
Guide.