SQLTeam.com | Weblogs | Forums

Every month attendance of 26 to 25


how to find a record between two date of every month and previous month for eg i have two display attendance of 26/2/2016 to 25/3/2016,i have to display every month attendance of 26 to 25


Could you supply some sample input and desired output?


i have to display a attendance of everymonth on the dashboard, its start from 26 and end 25 of next month..


Please do as suggested


Displaying the attendance of every month between 26 will be the starting date and 25 will be the end of next month. We have to find the record of attendance between these two dates.. Similarly for every month


so using that data, what would the record of attendance be?


we have to find the record between these two date? Monthly report between 26 to 25
[TimeIn] ,[TimeOut]


You're not giving enough to work on here. We don't have your table definitions or full input and output data, so we can only answer in general:

select columns
from  your table
where day(timeIn) >= 26 and day(timeOut) <= 25 and datediff(month, timein, timeout) <= 1