|
-
Apr 20th, 2000, 03:32 AM
#1
1.5 * 3.5 hours
I got my program to recognise that the time is or is not pass 5:00PM. The only thing I need to get to work now is the calculation below the IF statement. The If does work corectly.
Const OTLimit As Date = #5:00:00 PM#
Const OTCost As Integer = 1.5
If EndTime > OTLimit Then
OT = (EndTime - OTLimit)
OT = (OT * OTCost)
lblTotalHours.Caption = OT
End If
Thanks
Ken Devorak
-
Apr 20th, 2000, 09:59 AM
#2
Addicted Member
Hi Kenny_Dee,
Const OTCost As Integer = 1.5
Hint: Do you see 1.5 as an integer ? 
Good luck.
-
Apr 20th, 2000, 10:10 AM
#3
Addicted Member
Hi Kenny_Dee,
Lyla is right, an integer can't have a decimal point. You'll need to Dim it as a Single (or Double).
Also, I'm assuming you know the code you posted isn't complete. I'm guessing that you set the value of
EndTime somewhere and just didn't list it in the code you posted.
Good luck.
JC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|