您的位置:首页 > 其它

如何显示最近过生日的记录

2010-10-18 15:32 197 查看
询出所有在距离今天一个星期内过生日的数据记录。

select Birthday from table where convert(datetime,convert(varchar,year(getdate())) + substring(convert(varchar,Birthday,120),5,6)) between getdate() and dateadd(day,7,getdate())
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐