检查有效日期 [英] Checking for a valid date

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

问题描述

验证用户输入有效日期的最简单方法是什么?

What''s the easiest way to verify the user had entered a valid date ?

推荐答案

" romy" < RO ****** @ Powerup1.com> schrieb
"romy" <ro******@Powerup1.com> schrieb
验证用户输入有效日期的最简单方法是什么?
What''s the easiest way to verify the user had entered a valid date ?




Call Date.Parse在Try / Catch块中。如果没有例外,那么日期是

有效。

Armin



Call Date.Parse in a Try/Catch block. If there''s no excecption the date was
valid.
Armin





romy写道:


romy wrote:
验证用户输入有效日期的最简单方法是什么?
What''s the easiest way to verify the user had entered a valid date ?




IsDate()函数。


-

Larry Lard

回复团体请



The IsDate() function.

--
Larry Lard
Replies to group please


" romy" < RO ****** @ Powerup1.com> schrieb:
"romy" <ro******@Powerup1.com> schrieb:
验证用户输入有效日期的最简单方法是什么?
What''s the easiest way to verify the user had entered a valid date ?




''Microsoft.VisualBasic.Information .IdDate''。


-

MS Herfried K. Wagner

MVP< URL:http:// dotnet .mvps.org />

VB< URL:http://classicvb.org/petition/>



''Microsoft.VisualBasic.Information.IsDate''.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


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

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