请教一个VB6问题:一个command一个timer一个text,实现点击command,text里面显示当前时间+6小时后的时间
也就是text里面显示6个小时候的时间(当前时间加上6个小时),在线等待哪位大大给我解惑,最好有具体的代码...
也就是text里面显示6个小时候的时间(当前时间加上6个小时),在线等待哪位大大给我解惑,最好有具体的代码
展开
1个回答
展开全部
Private Sub Command1_Click()
Dim hours, dates
hours = Split(Time, ":")(0) + 6
dates = Split(Date, "/")(2)
If hours >= 24 Then hours = hours - 24: dates = dates + 1
Text1 = Now & " | " & Split(Date, "/")(0) & "/" & Split(Date, "/")(1) & "/" & dates & " " & hours & ":" & Split(Time, ":")(1) & ":" & Split(Time, ":")(2)
End Sub
Dim hours, dates
hours = Split(Time, ":")(0) + 6
dates = Split(Date, "/")(2)
If hours >= 24 Then hours = hours - 24: dates = dates + 1
Text1 = Now & " | " & Split(Date, "/")(0) & "/" & Split(Date, "/")(1) & "/" & dates & " " & hours & ":" & Split(Time, ":")(1) & ":" & Split(Time, ":")(2)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询