# Re: 加一个format

Posted by wave on July 16, 1998 at 09:25:51:

In Reply to: 请问如何判断日期输入是否正确(用函数判断) posted by Keven on July 15, 1998 at 10:34:57:

: 请教各位高手,VB中是否有可判断日期输入之函数,
: 例:输入之顺序为=>日/月/年,本人用IsDate("13/12/98")回应为True,
: 因其把它当成"12/13/98",本人想问看是否有不用逐一去抓取"月","日"
: 的方式,而用函数来判断,谢谢各位高手!

试试看下列结果
dim a as string
a = "13/12/98"
Print (format(a,"mm/dd/yy") = a) and isdate(a)

Follow Ups:

- Re: 加一个format更正 wave 10:07:54 7/16/98 (0)