Set different day as start and end of the week in BIRT Report
Hi All,
Generally Monday is considered as start of the week and Sunday is considered as the end of week. I would like to understand whether there is a way to change this to start of the week = Wednesday and end of the week = Tuesday . User would be entering start date and end date as report parameter which would be typically for a month. For example
start date = 04/01/2020 and end date = 04/30/2020 , below is the data present in the table and the output should be like second table
I have been trying to do this using DB2 query however it doesnt seem to be achievable hence wanted to know if there is a way to achieve this using BIRT.
Generally Monday is considered as start of the week and Sunday is considered as the end of week. I would like to understand whether there is a way to change this to start of the week = Wednesday and end of the week = Tuesday . User would be entering start date and end date as report parameter which would be typically for a month. For example
start date = 04/01/2020 and end date = 04/30/2020 , below is the data present in the table and the output should be like second table
I have been trying to do this using DB2 query however it doesnt seem to be achievable hence wanted to know if there is a way to achieve this using BIRT.
column1 | column2 | Week |
abc | 64 | 1 |
abc | 2 | 2 |
abc | 50 | 3 |
abc | 23 | 4 |
abc | 22 | 5 |
Tagged:
0
Comments
-
Getting the week of the month with the week starting on Wednesday is possible in BIRT.Create a computed column in the data set. In the expression builder for the column, use the BirtDateTime functions. The weekOfMonth method gets the standard week count. I think you will need to get the day of week for the first day of the month. If it is >= 4, then subtract 1 from the weekOfMonth only if the dayOfWeek is < 4, else add 1 to the weekOfMonth only if the dayOfWeek is >= 4.Please test this logic carefully.Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management