Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for datetime
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01045440
Message ID:
01045535
Views:
23
>If you do not have the index on this field, then you may use locate command, like:
>
>locate for between(...)
>*or
>locate for datetime>... and datetime <...
>
This will not gonna work properly, because it will not necessarilly find the one that is closest to the given datetime.


>Otherwise:
>
>set order to ...
>set near on   && even not found, the cursor will be at the nearest match.
>?seek(...)
>
>
>
>>Hi,
>>I'd like to find a datetime field in a table which is the nearest to a certain given datetime. What functions can be used? And Any idea would be appreciated.
>>
>
>>Thanks
>>
>>Tamas Szigeti
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform