I am working on a personnel system and need to produce stats on the number of absences in the last quarter.
The database records the start date and end dates of the absences, in some cases however the end date is in the future. What I would like to do is only return the number of days absent for the current quarter. If I use the start and end date information I get the full number of days where the absence goes across in the next quarter. I also have a similar problem where the start date of the absence started in the previous quarters. I still want to be able to produce the number of days that person will be away in the current quarter.
Any ideas how best to get around this.
my table has the following columns
personnel ID
fromdate
untildate
total_workdays (mon to fri only)
total_days (mon to fir inc weekends)
Many thanks
The database records the start date and end dates of the absences, in some cases however the end date is in the future. What I would like to do is only return the number of days absent for the current quarter. If I use the start and end date information I get the full number of days where the absence goes across in the next quarter. I also have a similar problem where the start date of the absence started in the previous quarters. I still want to be able to produce the number of days that person will be away in the current quarter.
Any ideas how best to get around this.
my table has the following columns
personnel ID
fromdate
untildate
total_workdays (mon to fri only)
total_days (mon to fir inc weekends)
Many thanks