|Oracle® OLAP DML Reference
11g Release 2 (11.2)
|PDF · Mobi · ePub|
INTEGER expression that represents the year of the test date. For any year, you can specify the year as a four-digit number in the range 1000 to 9999. For years in the range 1950 to 2049 (the default) or some other range (as set through the YRABSTART option), you have the alternative of specifying a two-digit number that represents the last two digits of the year (96 represents 1996, for example).
INTEGER expression, normally in the range 1 to 12. When you specify an
INTEGER less than 1 or greater than 12, MAKEDATE returns a date in a year before or after the year specified by the
INTEGER expression for year.
For example, if the arguments to MAKEDATE are (
21), MAKEDATE returns the date
February 21, 1998 because, in effect, February 1998 is the fourteenth month of 1997.
INTEGER expression in the range 1 to 31.
When you display the result returned by MAKEDATE, the date is formatted according to the date template in the DATEFORMAT option. When the day of the week or the name of the month is used in the date template, the day names specified in the DAYNAMES option and the month names specified in the MONTHNAMES option are used. You can use the result returned by MAKEDATE anywhere that a DATE value is expected.
When the arguments to MAKEDATE do not represent a valid date between January 1, 1000, and December 31, 9999, MAKEDATE returns an
The following statements specify the date format and send the output to the current outfile.
DATEFORMAT = '<mtextl> <d>, <yyyy>' SHOW MAKEDATE(97 11 14)
These statements produce the following output.
November 14, 1997
The following statement calculates the date one year from today, and sends the output to the current outfile. The TODAY function returns today's date. The INTEGER functions YYOF, MMOF, and DDOF return the INTEGER values that correspond to the year, month, and day of today's date.
SHOW MAKEDATE(YYOF(TODAY) + 1 MMOF(TODAY) DDOF(TODAY))
When today's date is January 15, 1995, this statement produces the following output.
January 15, 1996