Click here to Skip to main content
15,896,430 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am displaying attendance details of each student on basis of month and year.
I want to display the monthly attendance (one or many months).
In application,i had two text boxes,one for starting month and another for ending month.
I want to pass this two values as parameters.
I want to caluclate the number of days in that month and store in variable,and to display that variable as column in output.
another is to calculate the present days and absent days, and display these two values in separate columns in output.
Posted
Comments
George Jonsson 24-Nov-15 5:43am    
What is the problem?
Hussain Javed 24-Nov-15 5:49am    
I want to display monthly attendance of each student.
I am passing two parameters one start date another end date.
In my table In_time and Out_time columns are there if student in_time is stored in database that means he is present otherwise absent.
[no name] 24-Nov-15 5:45am    
What have you tried yet?
Hussain Javed 24-Nov-15 5:52am    
how to set condition, In my table, In_time and Out_time columns are there if student in_time is stored in database that means he is present otherwise absent.
these result is stored in variables,i can display as output
F-ES Sitecore 24-Nov-15 5:45am    
This is not a question, it is a request for someone to do your work for you. Break each problem down and attempt it yourself and if you have a specific problem then ask a specific question.

1 solution

Below are sample procedure it will help you


C#
Create Procedure Usp_SelectStudentPresetDetails
As
@FromDate Datetime,
@EndDate Datetime
Begin

Select StudentName,intime
From TableName 
where DATEDIFF(d,@FromDate,FromDate) >= 0
			  AND DATEDIFF(d,@EndDate,ToDate)<= 0
			  AND intime IS NOT NULL


end
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900