About functions
A function provides a quick way to perform an operation on data maintained by Sage HRMS. In most cases, you can use menus, text fields, lists, check boxes, and radio buttons to enter and manipulate data. But sometimes you need to build your own expression to specify the processing you want to perform. You might want to use a function as part of the value in an expression.
Example: The last name field of an employee
in the database is Nelson. You can use the UPPER() function to have the last name expressed in all capital letters (NELSON). The expression to select this name is:
UPPER(P_LNAME)="NELSON"
The function may have one or more parameters that are always placed in parentheses following the function name. Each parameter is separated by a comma. The format of a function: NAME(parameter1, parameter2, ...)
The following sections describe some of the common functions.
Function |
Description |
---|---|
CDOW() |
Returns the name of the day of the week for a certain date. |
CMONTH() |
Returns the name of the month for a certain date. |
DATE() |
Returns the system date of the computer. |
DAY() |
Returns the day of the month, expressed as a number. |
MONTH() |
Returns the month of the year, expressed as a number. |
YEAR() |
Returns the year, expressed as a number. |
Function |
Description |
---|---|
CTOD() |
Converts a date from character-type to date-type. |
DTOC() |
Converts date data to character data in the form MM/DD/YY. |
DTOS() |
Converts date data to character data in the form YYYYMMDD. |
TRANSFORM() |
Converts any type of data into formatted character data. |
VAL() |
Converts character data into numeric data. |
Function |
Description |
---|---|
MAX() |
Returns the maximum of two numbers or dates. |
MIN() |
Returns the minimum of two numbers or dates. |
Function |
Description |
---|---|
INT() |
Truncates the decimal places of a number to its integer (a whole number). |
LOWER() |
Changes all the characters to lowercase. |
LTRIM() |
Removes the left-most spaces from the beginning of a field. |
SPACE() |
Adds a specified number of spaces to the end of a field. |
TRIM() |
Removes trailing spaces from the end of a field. |
UPPER() |
Changes all the characters to uppercase. |
Sage HRMS functions are unique to the Sage HRMS system. They are not accessible within the Expression Builder so you must manually enter it into your expression. See the alphabetical list of functions for the list and examples of using these functions.
Function |
Description |
---|---|
EMPTY() |
Determines whether a field (except a date field) contains any data. |
IIF() |
Responds differently if different conditions are true. |
ISNULL() |
Determines whether a date field is empty. |
SUBSTR() |
Extracts a specific portion of a field. |