There are various Report functions that can be used in a Cognos report.
Some of these different report functions include −
This function is used to return a positive or a negative number representing the number of days between the two datetime expressions. If a timestamp_exp1 < timestamp_exp2 then the result will be a –ve number.
_days_between(timestamp_exp1, timestamp_exp2)
This function is used to return a number representing the number of days remaining in the month represented by the datetime expression timestamp_exp.
_days_to_end_of_month(timestamp_exp)
This function is used to return a datetime that is the first day of the month represented by timestamp_exp.
This function is used to return the datetime resulting from adding integer_exp days to timestamp_exp.
_add_days(timestamp_exp, integer_exp)
This function is used to return the datetime resulting from adding integer_exp months to timestamp_exp.
_add_months(timestamp_exp, integer_exp)
This function is used to return the datetime resulting from adding integer_exp years to timestamp_exp.
_add_years(timestamp_exp, integer_exp)
This function is used to return a number that is obtained from subtracting timestamp_exp from today's date in YYYYMMDD format (years, months, days).
_age(timestamp_exp)
This function is used to return the day of week (between 1 and 7), where 1 is the first day of the week as indicated by integer_exp (between 1 and 7, 1 being Monday and 7 being Sunday). Note that in ISO 8601 standard, a week begins with Monday being day 1. In North America where Sunday is the first day of the week being day 7.
_day_of_week(timestamp_exp, integer_exp)
This function is used to return the ordinal for the day of the year in date_ exp (1 to 366). Also known as the Julian day.
_day_of_year(timestamp_exp)
Like these, there are various other Report functions as well that can be used.