Date and time functions are
created for use with a date format date, or a legacy date. The following
is the difference between a non-legacy date, also called a date format,
and a legacy date:
Standard functions. Standard
date and time functions are for use with date format. A date format
refers to an internally stored integer that represents the number
of days between a real date value and a base date (either December
31, 1900, for dates with YMD or YYMD format; or January 1901, for
dates with YM, YYM, YQ, or YYQ format). A Master File does not specify
a data type or length for a date format; instead, it specifies display
options such as D (day), M (month), Y (2-digit year), or YY (4-digit
year). For example, MDYY in the USAGE attribute of a Master File
is a date format. A real date value such as March 5, 1999, displays
as 03/05/1999, and is internally stored as the offset from December
31, 1900.
A date format was formerly called a smart date.
Legacy functions. Legacy
date functions are for use with legacy dates. A legacy date refers
to an integer, packed decimal, or alphanumeric format with date
edit options, such as I6YMD, A6MDY, I8YYMD, or A8MDYY. For example,
A6MDY is a 6-byte alphanumeric string; the suffix MDY indicates
how Information Builders returns the data in the field. The sample
value 030599 displays as 03/05/99.