SQLTeam.com | Weblogs | Forums

Every month attendance of 26 to 25


#1

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


#2

Could you supply some sample input and desired output?


#3

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


#4

Please do as suggested


#5

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
26/02/2016
27/02/2016
28/02/2016
..
..
..
25/03/2016


#6

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


#7

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


#8

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