-
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
-
Hi Kenny_Dee,
Const OTCost As Integer = 1.5
Hint: Do you see 1.5 as an integer ? ;)
Good luck.
-
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.