>>>Yes, I was surprised that it's not well known.
>In my applications there are a lot of places that depend on datetime values and whenever a bug is reported it was ending with this weirdness. ie:
>Check for login records occured at a specific time:
>
>>>where logintime = m.ltCheckTime
>
>>>this fails!
>
>
>Do you have an example where the = fails on a direct time to time comparison.
>
>Note the following changes to the sample code:
>
>CLEAR
>Create cursor test (myTime t)
>For ix=0 to 23
> Insert into test values (Datetime(2000,1,1,m.ix))
> ltCheck = Ctot('^2000/1/1 '+Padl(m.ix,2,'0'))
> If !(m.ltCheck - test.myTime == 0)
> ? 'Sub Mismatch',m.ix,m.ltCheck=test.myTime
> endif
> If !(m.ltCheck = test.myTime)
> ? 'Eq Mismatch',m.ix,m.ltCheck=test.myTime
> endif
>ENDFOR
>RETURN
>
>
>On my system the calculated answers fail about avery third time. But the equal statement always works.
John,
VFP is not installed on this box but you might simply test it yourself. Check Dragan's sample for example and try it a few times. Also try to SQL select with equality operator.
Cetin