The *DATE DETAILS built-in function returns information about a given date; for example, day of week, length of month, or whether it is in a leap year. You specify the kind of information you need using the *Date detail type parameter.
Note: You should check the return code set by this function in order to catch any errors encountered.
There are seven parameters for this function type:
For more information on the selection input parameters, see the Selection Parameters for Date Built-In Functions subtopic later in the Date Details topic.
The possible values for the *Date detail type and the effect of each on the meaning of the output field are summarized in the following table.
|
*Date Detail Type Values |
Effect on the *Date Detail Parameter |
|---|---|
|
*ABSOLUTE DAY |
The result is the number of days that have elapsed since January 1, 1801 (the day one) for the given date. |
|
*DAY OF YEAR |
The result is an integer from 1 to 366, specifying the number of selected days that have elapsed since the beginning of the given year. |
|
*DAY OF MONTH |
The result is an integer from 1 to 31, specifying the number of selected days that have elapsed since the beginning of the given month. |
|
*DAY OF WEEK |
The result is an integer from 1 to 7, specifying the number of selected days that have elapsed since the beginning of the given week. The days of the week are numbered sequentially beginning with 1=Monday. |
|
*SELECTED? |
The result specifies whether the given date was selected. See the *Select Days/ Dates parameter. 1=the date was selected. 0=the date was not selected. |
|
*MONTH |
The result is an integer from 1 to 12, specifying the month of the given date. |
|
*MONTH LENGTH |
The result is an integer specifying the number of selected days in the month for the given date. |
|
*YEAR |
The result is the year of the given date, in the format YYYY. |
|
*LEAP YEAR? |
The result specifies whether the given date is in a leap year. 1=the date is in a leap year. 0=the date is not in a leap year. |
|
*YEAR LENGTH |
The result is the number of selected days in the year for the given date. |
|
|
|
Note: The result in *Date detail reflects only selected days unless you specify *ABSOLUTE DAY, *MONTH, *YEAR, or *LEAP YEAR for *Detail type.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |