Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date indices - what is best ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096615
Message ID:
00096666
Views:
19
Michel,

Yes, it is a logical thought, but it ain't so - without DTOS FP/VFP will use whatever the present setting is for SET DATE. So if you change it between record writes, those records will each have the format in effect at time of write!

Cheers,
Jim N

>Hi Jim,
>
>As FoxPro always handles dates internally as YYYYMMDD, I would have
>thought the SET DATE setting would not affect the reliability of an
>index based on date type data rather than character type data ?
>
>Michel.
>
>================= Your original message follows ================
>>Michel,
>>
>>I've always felt that using DTOS was to ASSURE true date order (regardless of the SET DATE setting) and nothing much more. But that's a pretty important fact!
>>
>>I know of nothing better in VFP.
>>
>>Cheers,
>>Jim N
>>
>>>It would seem that in FoxPro 2.x the best way to index a table
>>>on a DATE field was to index on DTOS(Fieldname) as that
>>>created a character based index which proved to be much faster
>>>in operation than a date based index where, during comparison,
>>>dates had in any case to be converted internally to characters by FoxPro.
>>>
>>>My question is : does this still hold true in Visual FoxPro,
>>>or is there an even better way to have date-based indices in
>>>Visual FoxPro 5.
>>>
>>>Note : I could of course run some experiments, but by posting this
>>>question I am hoping someone else has already done the experiments.
>>>
>>>Much Thanks.
>>>Michel Creppy.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform