Hi Rodger,
You might want to create a calculation with the following syntax:
datediff({ww};[Date1];[Date2]).
If this datediff function does not work, you might want to calculate using _days_between:
_days_between ([Date2];[Date1]), you will need to divide by 7 to get weeks instead of days.
Best regards,
------------------------------
Patrick Neveu
Positive Thinking Company
IBM Champion
------------------------------
Original Message:
Sent: Tue April 18, 2023 05:47 AM
From: Rodger Yang
Subject: how to covert SQL SERVER script into IBM Cognos Analytics report
I am designing one report in IBM Cognos Analytics. the request is to convert the following SQL script into Cognos report to calculate week difference between 2 datetime. please help . thanks in advance.
-----------------SQL SERVER script statement--------------------------------
datediff(wk, FIRST_DATE_TIME_STAMP, LAST_DATE_TIME_STAMP)
------------------------------
Rodger Yang
------------------------------