Convert Now() (1 Viewer)

L4serK!LL

Registered User.
Local time
Today, 10:34
Joined
Jul 22, 2002
Messages
59
Code:
If (RST("Worktime") + Now() > RST("LeaveTime")) Then
        MsgBox "Insufficient time to complete the work..."
End If

This piece of code checks if there's enough time left to complete the work seen from the current time, but "WorkTime" and "LeaveTime" are stored only with hours, minutes & seconds while Now() gives a full date, so my guess would be this won't work :(
I'd need to convert the Now() to a new date with only hours and minutes and seconds...

Only question is how... :rolleyes:

I tried CDate(Format(Now(), "u:m:s")) as help said
"MyStr = Format(MyTime, "u:m:s") ' Geeft 17:4:23"
but that don't work (unmatching types)...
 

L4serK!LL

Registered User.
Local time
Today, 10:34
Joined
Jul 22, 2002
Messages
59
Hmmm, you got a point there :eek:
 

Users who are viewing this thread

Top Bottom