日期时间选择器和检查
问题描述:
我在前端有一个日期时间选择器,我想选择一个日期并想发送年份以生成报告,明智的数据存储在sql server中,
1-建议我如何区分数据库中的两类数据
2-每年生成报告
a-如果选择2009年6月之前的日期,则报告将显示2009年6月之前的2009年员工总数
b-如果在2009年6月之后,该报告将显示在2009年6月之后输入的记录,
c-与2010年和2011年相同
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
答
尝试:
SELECT * FROM myTable WHERE DATEPART(year, nameOfDateField) = 2009
我目前正在使用日期时间选择器,
我想生成消息
如果
选择的日期小于2010年6月或大于2011年6月
如果有人知道,请plz回复
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