CW Dateformula


I am designing a report in which I want the sum of amount for the current week. Please can anyone suggest how should I work with CW for my requirement.

Thanks in advance…

You can use CALCDATE to calculate the Start Date based on WorkDate/Today and then set filter on table and get the sum

Thanks fa the reply…

I do not want to specify the startdate on the report. It has to take the current week by default, like today is Tuesday, irrespective of the day I want the sum of amount for the current week i.e from Monday to coming sunday of this week.

Then use Date table and Put Filter on Period Type week

Find the week which has today between start date and end date.

You will get week start date here.

Ok… But am not finding any table as Date… Is it a standard table? Can I have its ID?

Its a Virtual table like Integer

ID 2000000007

Hi divya,

Did you ever find a solution to your problem? If you did, would you mind sharing it with us and if any of the posted answers helped you on the way, then please verify them.

Thank you.

CALCDATE is still much easier. See this code example:

MondayDate := CALCDATE('CW-6D',TODAY); SundayDate := CALCDATE('CW',TODAY);