Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a date time picker on front end, i want to select a date and want to send year for report generation,ear wise data is stored in sql server,

1- suggest me how to differentiate data in two categories in database
2- generate reports on year basis

a-if select date before june 2009, the report will display total employees for 2009 before june
b-if after june 2009, the report will display records entered in 2009 after june,

c- same for 2010 and 2011
Posted
Updated 9-Aug-11 22:24pm
v2

Try:
SQL
SELECT * FROM myTable WHERE DATEPART(year, nameOfDateField) = 2009
 
Share this answer
 
i am currently working with datetime picker,
i want to generate message
if
selected date is less than June 2010 or greater than june 2011

plz reply if any one knows
 
Share this answer
 
Comments
Toniyo Jackson 10-Aug-11 4:43am    
Don't ask your question in answer section

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