Joined: 14 Dec 2010
Online Status: Offline
Posts: 5
Topic: If else condition Problem Posted: 02 Mar 2011 at 9:37am
Please can anyone help me fix this error of mine.The problem is i have a clockInTime and ClockOuttime Fields in my database.What i want to do is to get the difference between these Clockin and Out time but when some clocks in and has not yet clock out it should display Not Clock out and the deference should be 00:00:00.I am using this crystal syntax but it is give me an error message.Please help me
Local DateTimeVar COut=12:00:00
if{ClocksTable.ClockOutTime}=COut then
COut-Cout
{ClocksTable.ClockOutTime}="Not Clock Out"
else
{ClocksTable.ClockOutTime}-{ClocksTable.ClockInTime}
//Please for a explanation this was how i implemented this in vb.net and it is giving me the correct data but how to do this in crystal is very difficult
??VB
'If the person is not clocked out then we write not clockout and the difference
'will be 0
If ClockOutTime = "12:00:00 AM" Then
TimeDiffs = TimeValue(ClockOutTime) - TimeValue(ClockOutTime)
ClockOutTime = "Not Clock Out"
Else
TimeDiffs = TimeValue(ClockOutTime) - TimeValue(ClockInTime)
End If
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum