JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: Cdate function Archived to Disk
Here's another way to do times... I was thinking there was an easier way, but can't remember offhand.
Generally you can use CDate(), Format(), DateAdd(), the following code, or a combination of functions.
Private Sub Form_Load()
Dim hr1 As Integer
Dim mn1 As Integer
Dim sc1 As Integer
Dim hr2 As Integer
Dim mn2 As Integer
Dim sc2 As Integer
hr1 = Format("2:10", "h")
mn1 = Format("2:10", "n")
sc1 = Format("2:10", "s")
hr2 = Format("2:15", "h")
mn2 = Format("2:15", "n")
sc2 = Format("2:15", "s")
MsgBox ("Hrs: " & hr2 - hr1 & " Minutes: " & mn2 - mn1 & " Seconds: " & sc2 - sc1)
End Sub
|