vb 判断字符串是否为日期或时间,在输入框输入任意字符串类型,程序将会判断出该字符串是否是时间字符串,这个判断方法VB员自带有函数,使用IsDate即可实现,下面是使用IsDate的简单用法示例:
If IsDate(Text1) = True Then
Text2.Text = "是日期"
Else
Text2.Text = "不是日期"
End If
您也可以在本页下载完整的源码实例。
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.012243s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.147228s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001062s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001163s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.000973s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003537s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.001003s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.004136s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.018680s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001163s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 294554 [ RunTime:0.066298s ]