The following table describes functions that return or operate on data values.

Table 1. Date functions
Function Description
DAY Evaluates a date expression and returns a day of the month as an INTEGER value from 1 to 31, inclusive.
MONTH Evaluates a date expression and returns a month INTEGER value from 1 to 12, inclusive.
YEAR Evaluates a date expression and returns the year value of that date, including the century, as an INTEGER value.
WEEKDAY Evaluates a date expression and returns the day of the week as an INTEGER value from 1 (Sunday) to 7 (Saturday) for that date.
TIME Returns an INTEGER value representing the time as the number of seconds since midnight. Use this function together with the STRING function to produce the time in hours, minutes, and seconds.
TODAY Returns the current system date.

Functions that convert data are discussed in later sections. An example of such a function is the STRING function.

To use the STRING function to convert the time into a meaningful display:

  1. In the Procedure Editor, select File > New Procedure Window to open a new procedure window.
  2. Enter the following code, which applies the STRING function to the result of the TIME function, along with the formatting characters HH (hour), MM (minute), and SS (second):
    DISPLAY STRING(TIME, "HH:MM:SS").
  3. Press F2. The Procedure Editor window appears: