Previous Topic: $DATE FunctionNext Topic: $EDIT Function


$DAY Function

$DAY returns the numeric value for the day of the month (1‑31), either for the current date or for the date in the specified date field.

This function has the following format:

     [($TODAY)    ]
$DAY [(date‑field)]

$DAY alone returns the day of the month for the current day ($TODAY).

For a complete explanation of date‑fields, see PDL Language Concepts topic in the "Procedure Definition Language Concepts and Language Elements" chapter.

Example

Assume W_DATE is a type D field. The following gives the value of the last day of the previous calendar month with respect to W_DATE.

W_DATE ‑ $DAY(W_DATE)