用于无效日期,月份和年份的代码 [英] for code ofinvalid date,month and year

查看:96
本文介绍了用于无效日期,月份和年份的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生您好,
我做了一个简单的程序,所以我很难理解
我使用掩码txt框为用户显示出生日期
但在此用户中输入任何月份,日期和年份,以便他们采用
但我只希望31天12个月以及特定年份来
如果用户输入了无效的日期,月份或年份,则显示此消息是无效的日期,月份和年份
请任何人提供此问题的代码
谢谢..............

hello sir,,
i make a simple progrram so i have diffcultes
i use mask txt box for showing dateof birth for the user
but in this user input any month ,date and year so they take
but i want only 31 days and 12 month and particular year come
if user insert invalid date, month or year so show message this is invaild date, month and year
please anyone give the code of this problem
Thank you........

推荐答案

为此使用正则表达式.

您去了:
匹配有效日期的正则表达式 [
Use Regular expressions for it.

Here you go:
Regular Expression Matching a Valid Date[^]


这篇关于用于无效日期,月份和年份的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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