Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date function
Message
From
26/01/2016 08:51:36
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01630218
Message ID:
01630220
Views:
67
>I have seen some code which is as follows
>
>select names
>set order to tag datex
>set key to dtot({})
>
>The file is ordered by date time
>
>Does the set key set a filter to today's date?
>
>If not what does it do?

You should finaly learn how to use this forum, in special the pre tags. Is it realy that tricky to copy a couple of lines out of a reply?

How to test?
?dtot({})
?dtot({})=DATETIME()
?dtot(DATE())=DATETIME()
?dtot(DATE())
DATETIME is a second, you compare the first second of today with any other second of today. This will not match. Or only by a chance of 1/86400.

The riddle might be solved with
HELP SET KEY
Pro tip:
set key to RANGE dtot(DATE()),dtot(DATE()+1)-1
*IOW SET KEY to a range between the first second of today and a second before the first second of tomorow, aka the last second of today.
Alles klar?

:D
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform