I have created a stored procedure that will count the amount of times a person is checked in with a fingerprint scan and the amount of times a person has manually checked in. I have already obtained these calculations.
However, I need to create a report that will show these counts always based on the Last Two Weekends in a month that the person is visiting. These dates should come in automatically based on the system date that a user is signed in.
I just do not know how to make the Begin Date and End Date be the last two weekends of the month. There has to be some type of calculation in the sp that is done to do this based on a DateRange Parameter that is entered. For example, if the user types in the textbox field called DateRange a letter "A" the Begin Date and End Date fields should automatically populate with the dates of the last two weekends always.
The counts and other data should come in based on these dates.
Any help is very much appreciated. I have attached a stored procedure that I have been working on. Please review this sp and you will see what I am trying to do.