Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Increment time() by 1 minute
Message
De
10/06/2005 20:02:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/06/2005 13:53:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01020951
Message ID:
01022373
Vues:
10
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform