Numeric Functions - IBM Cognos User Manual

Version 10.1.1
Table of Contents

Advertisement

Example
today ()
Returns today's date as the result.
Year
Returns the year from the date.
Syntax
year (date_exp | datetime_exp)
Example
year (2007-12-10)
Returns the result: 2007
Years-Between
Returns the difference between the year values of date_exp1 and date_exp2. If
date_exp1 is later than date_exp2, the result will be a negative number.
Syntax
years-between (date_exp1 | datetime_exp1, date_exp2 | datetime_exp2)
Example
years-between (2005-03-21, 2007-03-21)
Returns the result: 2

Numeric Functions

Accepts numeric input and returns numeric values.
Absolute
Converts numbers to their unsigned value.
Use when you need positive numbers, or when you need to find the absolute
difference between values in a list of positive and negative values.
362
IBM Cognos Transformer Version 10.1.1: User Guide
Function
Description
Absolute
Converts numbers to their unsigned value.
Ceiling
Returns a number rounded to the next highest integer.
Floor
Returns a number rounded to the next lowest integer.
Integer-Divide
Returns the integer obtained from truncating the result of an
integer divided by a second integer.
Mod
Returns the remainder (modulus) of an integer divided by a second
integer.
Number-to-String
Returns a string from a number.
Round-Down
Returns a number rounded down.
Round-Near
Returns a number rounded to the nearest value.
Round-Up
Returns a number rounded up.
Round-Zero
Returns a number rounded toward zero.
Sqrt
Returns the square root of a positive number.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents