Hello, i wan’t to calculate the number of weekends between two dates. I am using MySQL. This is possible to do using only the initial date and the final date?
Hi Leonardo,
How will you pass the start and end date between which number of weekends are there?
However I am meanwhile sharing the method to identify the dayname.
In the Adhoc editor drag the column twice that is having the date column.
Now click on the first date column and go to “More”. Then go to “Advanced” and apply “DayName” function. On the second date column do a count.
Thus you will be able to, in that specific column, how many count of days are there.
Step 1; Drag the two columns
Step 2:
Step 3: Apply DayName function on the first column
Step 4: Apply count on second column
Step 5: Generate the report
Hi, i will provide the initial date and the final date, like initial date = “2019/05/01” and final date = “2019/05/31”. I want to know how many weekends have between these two dates. Is this possible?
As mentioned in the answer above we can find out the dayname count. Now here you can add two filters i.e. one will be start date and the other will be end date and thus you will be able to get the dayname count. However we will still need a column of date on which dayname function could be applied.
If that is not possible you may have to create a view at the DBlevel to handle that since it might be a bit tricky at the frontend. There are other options also wherein filter expressions at adhoc report interface can be used to implement that.
Ok, thank you for the answers.