Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on Datetime column?
Message
De
20/11/2001 17:22:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrats & ententes
Divers
Thread ID:
00469678
Message ID:
00584235
Vues:
48
>So couldn't I just make this my default value for datetime columns :
>
cNow = Ctot(Ttoc(Datetime()))
>That way when VFP converts it to string the milliseconds zero out before it hits the table.

You'd better stay away from character-date/datetime, Strictdate settings may come to haunt you. To date and back would be faster and safer:
cNow = <b>D</b>toT(Tto<b>D</b>(Datetime()))
Oh, I misread. If you want to omit the milliseconds, there's no need for it. It indexes on whole seconds. Just try to do a seek, and you'll see - you'd actually have to trim the milliseconds from what you search by, not the index expression.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform