sqldatecognoscognos-11

Cognos SQL _last_day_of_month


I would like to find the last day of a month with Cognos SQL. When I use the function in Cognos I just get an error message, although the date format is correct (e.g. 2023-02-14).

Any idea what I am doing wrong here?

Cognos SQL Code


Solution

  • The _last_of_month function expects a date data type and you are passing it a string. You will need to cast the string to a date. Additionally syntactically you have too many closing brackets.