求助??关于文本格式问题??

hooligan31000 2004-03-23 11:34:29
有一个文本框必须输入日期型。比如1632-6-6,还有一个“确定”按钮,按“确定”来判断输入是否是日期型,怎么写?
谢谢
...全文
23 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
julysixth 2004-03-23
  • 打赏
  • 举报
回复
笨办法:
on error goto errdispoal
if cdate(text1.text)=date or cdate(text1.text)<>date then
msgbox "正确"
exit sub
endif
errdispoal:
msgbox "错误"
华芸智森 2004-03-23
  • 打赏
  • 举报
回复
if isdate(text1.text) then
'是日期型
else
'不是日期型
end if
victorycyz 2004-03-23
  • 打赏
  • 举报
回复

if not isdate(text1) then
msgbox "日期格式不对"
end if

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧