Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on Datetime column?
Message
From
20/11/2001 17:22:26
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Miscellaneous
Thread ID:
00469678
Message ID:
00584235
Views:
41
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform