8 个解决方案
#1
取出birthday月 日 部分 看是不是和今天的日期相同
#2
这个~~原理我也知道啊,关键是怎么提出来月份和日期
#3
DateTime类里面有年月分秒毫秒
#4
请问你是指用SQL语句还是DataSet来筛选?
用SQL语句
select * from employee where month(employeebirthday) = month(getdate()) and day(employeebirthday) = day(getdate())
如果是DataSet来筛选
((DataTime)employeeTable[currentRow]["employeebirthday"]).month() == DateTime.Today().month() && ((DataTime)employeeTable[currentRow]["employeebirthday"]).day() == DateTime.Today().day()
用SQL语句
select * from employee where month(employeebirthday) = month(getdate()) and day(employeebirthday) = day(getdate())
如果是DataSet来筛选
((DataTime)employeeTable[currentRow]["employeebirthday"]).month() == DateTime.Today().month() && ((DataTime)employeeTable[currentRow]["employeebirthday"]).day() == DateTime.Today().day()
#5
这样写错在哪?(compact是合同表,存合同到期时间),我想找出员工表中这个合同到期的人员的具体信息:写SQL语句是这样的:"select xm,dept,uname,phone from yuangong where uname "
+ "in(select uname from compact where"
+ " datepart(day,outtime)=datepart(day,getdate())& datepart(month,outtime)= datepart(month,getdate()))
+ "in(select uname from compact where"
+ " datepart(day,outtime)=datepart(day,getdate())& datepart(month,outtime)= datepart(month,getdate()))
#6
&应该是&&
#7
学习一下
#8
怎么取出来
难道你的字段不是datetime或者字符串吗
不是'2000-1-1'这样的形式吗
和now比较啊
难道你的字段不是datetime或者字符串吗
不是'2000-1-1'这样的形式吗
和now比较啊
#1
取出birthday月 日 部分 看是不是和今天的日期相同
#2
这个~~原理我也知道啊,关键是怎么提出来月份和日期
#3
DateTime类里面有年月分秒毫秒
#4
请问你是指用SQL语句还是DataSet来筛选?
用SQL语句
select * from employee where month(employeebirthday) = month(getdate()) and day(employeebirthday) = day(getdate())
如果是DataSet来筛选
((DataTime)employeeTable[currentRow]["employeebirthday"]).month() == DateTime.Today().month() && ((DataTime)employeeTable[currentRow]["employeebirthday"]).day() == DateTime.Today().day()
用SQL语句
select * from employee where month(employeebirthday) = month(getdate()) and day(employeebirthday) = day(getdate())
如果是DataSet来筛选
((DataTime)employeeTable[currentRow]["employeebirthday"]).month() == DateTime.Today().month() && ((DataTime)employeeTable[currentRow]["employeebirthday"]).day() == DateTime.Today().day()
#5
这样写错在哪?(compact是合同表,存合同到期时间),我想找出员工表中这个合同到期的人员的具体信息:写SQL语句是这样的:"select xm,dept,uname,phone from yuangong where uname "
+ "in(select uname from compact where"
+ " datepart(day,outtime)=datepart(day,getdate())& datepart(month,outtime)= datepart(month,getdate()))
+ "in(select uname from compact where"
+ " datepart(day,outtime)=datepart(day,getdate())& datepart(month,outtime)= datepart(month,getdate()))
#6
&应该是&&
#7
学习一下
#8
怎么取出来
难道你的字段不是datetime或者字符串吗
不是'2000-1-1'这样的形式吗
和now比较啊
难道你的字段不是datetime或者字符串吗
不是'2000-1-1'这样的形式吗
和now比较啊