VB 6.0时分秒定义比较
时间:2011-08-12
来源:互联网
获取当前时间 Command5.Caption = Time
我想知道现在是 上午还是下午
if 条件怎么写 then
上午
else if 条件怎么写 then
下午
Endif
我想知道现在是 上午还是下午
if 条件怎么写 then
上午
else if 条件怎么写 then
下午
Endif
作者: ni04730184 发布时间: 2011-08-12
VB code
Private Sub Command1_Click() Command5.Caption = Time If InStr(Format(Command5.Caption, "Medium Time"), "上午") Then MsgBox "上午" Else MsgBox "下午" End If End Sub
作者: chinaboyzyq 发布时间: 2011-08-12
如果是英文系统,恐怕就不好使了
作者: mokton 发布时间: 2011-08-12
Private Sub Command1_Click()
Command1.Caption = Time
If Val(Format(Command1.Caption, "HH")) < 12 Then
MsgBox "上午"
Else
MsgBox "下午"
End If
End Sub
Command1.Caption = Time
If Val(Format(Command1.Caption, "HH")) < 12 Then
MsgBox "上午"
Else
MsgBox "下午"
End If
End Sub
作者: mokton 发布时间: 2011-08-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28