在ACCESS中查询今天或者明天过生日的人
作者:NetFox 日期:2010-08-21
查询今天
SQL="select * from member where Month(birthday)=Month(date()) and Day(birthday)=Day(date())"
查询明天或N天以后
strsql = "select * from table where day(birthday) - day(date()) = N and month(birthday)=month(date())"
N:表示日期之差,若为1,则是查询明天过生日的人,依次类推...
SQL="select * from member where Month(birthday)=Month(date()) and Day(birthday)=Day(date())"
查询明天或N天以后
strsql = "select * from table where day(birthday) - day(date()) = N and month(birthday)=month(date())"
N:表示日期之差,若为1,则是查询明天过生日的人,依次类推...
评论: 5 | 引用: 0 | 查看次数: -
发表评论