2
Answers

How to get missing records in a month?

shosho s

shosho s

8y
322
1
I have a table in which i record the user time in and time out daily in a month.
So lets suppose today a user didnt time in /time out (and there could be many more days in a month.)
 
How can i get these records per month excluding the weekend which is Friday and Saturday? 
 
 
Thank you in advance 
Answers (2)
0
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
If you are using sql server, all you have to do is, have a table variable with rows with all the required dates in that table.
The select from that table and left outer join (or cross join) with attendance table, you get the all the dates and null next to dates where there is no data.
0
Midhun T P

Midhun T P

NA 19.7k 281.2k 8y
Hi,<br><br> Please find the relative solution in sql-<br> http://marlonribunal.com/finding-gaps-in-or-missing-dates-using-tsql/<br><br> Also have a look at below threads for something similar done with linq-<br> http://stackoverflow.com/questions/1468637/filling-in-missing-dates-using-a-linq-group-by-date-query<br> http://stackoverflow.com/questions/35062144/find-missing-date-in-listdatetime-and-insert-that-date-on-the-right-index