比赛日期 [英] Matching Dates

查看:116
本文介绍了比赛日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将BirthDate与当前日期匹配?请将查询...在我的asp.net中运行...

How Can I match BirthDate With Current Date???Pls Ans me the query ...which is run in my asp.net ...

推荐答案

DateTime.Now为您提供带有当前日期的DateTime对象.然后只需将对象的天和月与您的生日进行比较
DateTime.Now gives you a DateTime object with the current date. Then just compare the objects'' Day and Month with your birthday



|我该如何将BirthDate与当前日期匹配?请将查询...在我的asp.net中运行...

您的标记说"SQL 2005",但在您提到的问题中,您提到您需要在asp.net中运行查询..一个令人困惑的问题,请在此后正确询问该问题,否则我们只能猜测无法解决.

让我们来..如果您需要前端的解决方案,请遵循 benjymous 方法

否则,如果您需要sql中的解决方案,请查看以下内容

wrote
|How Can I match BirthDate With Current Date???Pls Ans me the query ...which is run in my asp.net ...

Your Tag saying "SQL 2005" but in your question you mentioned you need query run in asp.net....A Confusing question, please hereafter ask the question correctly otherwise we can only guess not solve.

let''s come..if you need the solution in front end then follow benjymous method

otherwise if you need the solution in sql, look into the following

SELECT * FROM tblPerson WHERE CONVERT(nvarchar(10),BirthDate,101)=CONVERT(nvarchar(10),GetDate(),101)


这篇关于比赛日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆