Try OpenEdge Now
skip to main content
ABL Essentials
Using Basic ABL Constructs : Defining an IF-THEN-ELSE decision point : ABL Functions : Date functions
 
Date functions
The following table describes functions that return or operate on data values.
Table 5. Date functions
Function
Arguments
Returned value
DAY
DATE
INTEGER — The day of the month
MONTH
DATE
INTEGER — The month of the year
YEAR
DATE
INTEGER — The year
WEEKDAY
DATE
INTEGER — The day of the week, starting with 1 for Sunday
TIME
none
INTEGER — The number of seconds since midnight
TODAY
none
DATE — Today's date
Functions that convert data are discussed in later chapters. 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: