Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Increment time() by 1 minute
Message
From
10/06/2005 20:02:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/06/2005 13:53:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01020951
Message ID:
01022373
Views:
11
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform