EasyManua.ls Logo

IBM Cognos - Page 375

IBM Cognos
411 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 ()
Appendix F. IBM Cognos Transformer Expression Editor 361

Table of Contents