IBM Cognos User Manual page 375

Version 10.1.1
Table of Contents

Advertisement

Last-of-Month
Returns the last day of the month from a date or datetime value.
Syntax
last-of-month (date_exp | datetime_exp)
Example
last-of-month (2007-03-21)
Returns the result: 03/31/2007 00:00
Month
Returns the month number as an integer from 1 to 12, from a date or datetime
value.
Syntax
month (date_exp | datetime_exp)
Examples
month (2007-03-21)
Returns the result: 3
month (2007-03-21 09:21:00.000)
Returns the result: 3
Months-Between
Returns the number of months between two dates. If the first date is later than the
second date, then the result is a negative number. This function does not round
months; the days and time portions of the difference are ignored.
This function is processed only on an IQD data source.
Syntax
months-between (date_exp_1 | datetime_exp_1, date_exp2 | datetime_exp2)
Examples
months-between (2007-03-21, add-months (2007-03-21, 4))
Returns the result: 4
months-between (2007-01-31, 2007-02-01)
Returns the result: 0
months-between (2007-01-31, 2007-03-21)
Returns the result: 1
Today
Returns the current date according to the date set on your computer.
Syntax
today ()
361
Appendix F. IBM Cognos Transformer Expression Editor

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents