如何通过输入出生日期显示当前年龄,月份和日期? [英] how to display the current age , months , and days by entering the date of birth?
本文介绍了如何通过输入出生日期显示当前年龄,月份和日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
请帮帮我,如何在文本框中输入他的出生日期时显示人的年龄,月和日(例如:13 / 06/1991),应显示他当前的年龄,月份和日期。
感谢你。
hello friends,
please help me out , how to display the persons age,months and days while entering his date of birth in textbox (eg : 13/06/1991), should display of his current age in years, months, and days.
thanking you .
推荐答案
嗨...
查看此链接。
http://www.webcodeexpert.com/2013/07/get-age-in-yearsmonthsdayshours-and.html#.UrGMSFOZCqE [ ^ ]
http:// www .aspdotnet-suresh.com / 2010/10 / how-to-calculate-age-person-and.html [ ^ ]
[ ^ ]
谢谢你。
Hi...
See this link.
http://www.webcodeexpert.com/2013/07/get-age-in-yearsmonthsdayshours-and.html#.UrGMSFOZCqE[^]
http://www.aspdotnet-suresh.com/2010/10/how-to-calculate-age-of-person-and.html[^]
calculating of age by year,months and day in vb.net[^]
Thank u.
阅读OriginalGriff的这篇文章:
使用Age:它与TimeSpan不同!]
Read this article by OriginalGriff:
Working with Age: it's not the same as a TimeSpan!]
我不会给你算法,因为你应该能够自己思考的东西
使用DateTime:
今日日期时间
日期时间进入生日
今天= DateTime.Now.Date,那么你有当前日期。
然后只需 ... 从今天开始输入生日。
瞧,你收到的日期时间有年,月,日,小时,分钟,秒
这个是你的年龄,月份和天数
I won't give you the algorithm because that something you should be able to think about by your self
use DateTime:
DateTime today
DateTime enteredBirth
today = DateTime.Now.Date, then you have the current date.
then simply "..." enteredBirth date from today.
voila you recieve a DateTime with Years,Months,Days,hours,minutes,seconds
and this one is your Age in years, months and days
这篇关于如何通过输入出生日期显示当前年龄,月份和日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文