Cognos Analytics

Expand all | Collapse all


  • 1.  FIRST_DAY(((CURRENT_DATE) + (-1) YEAR)

    Posted Wed November 18, 2020 07:01 AM
    can anyone please let me know meaning of following sentence.

    Priyanka Joshi

  • 2.  RE: FIRST_DAY(((CURRENT_DATE) + (-1) YEAR)

    Posted Wed November 18, 2020 07:33 AM
    It's not a format I'm used to, but looking at it I'd say it's trying to filter the date in your report from one year ago to today.

    Chris Turner

  • 3.  RE: FIRST_DAY(((CURRENT_DATE) + (-1) YEAR)

    Posted Wed November 18, 2020 07:46 AM
    I agree with Chris T. The Between command will provide a result(s)/value/qry based on the date ranges specified beyond the command.

    Can you provide more detail as to where this command is being applied or used?  

    Rick Stacy
    Computer Programmer/Analyst
    Telecom Division
    Holyoke Gas & Electric
    99 Suffolk Street
    Holyoke, MA 01040
    T- 413-536-9300 (enter 252 once the greeting begins)
    M- 413-875-5170

  • 4.  RE: FIRST_DAY(((CURRENT_DATE) + (-1) YEAR)

    Posted Fri November 20, 2020 11:46 AM
    Edited by Michael Walter Fri November 20, 2020 11:47 AM
    "FIRST_DAY" is not a Cognos function, but it appears to be a vendor-specific one in IBM DB2 (see, What DB is your function running against?

    In any event, per the above, "BETWEEN FIRST_DAY(((CURRENT_DATE) + (-1) YEAR)) AND CURRENT_DATE" would mean FROM the first day of the current month one year ago TO the current day. For example, as I write this, today is 11/20/2020, so BETWEEN 11/1/2019 AND 11/20/2020 (including the start and end dates).

    Michael Walter
    Business Analyst