Private Sub Command1_Click()
MsgBox addtime(#10:59:59 PM#, 4)
'MsgBox addtime2(#10:59:59 PM#, 4)
End Sub
Function addtime(ByVal nowtime As Date, ByVal hours As Integer) As Date
addtime = Format(TimeSerial(Hour(nowtime) + hours, Minute(nowtime), Second(nowtime)), "hh:mm:ss")
End Function
Function addtime2(ByVal nowtime As Date, ByVal hours As Integer) As Date
addtime2 = Format(DateAdd("h", hours, nowtime), "hh:mm:ss")
End Function