Subject Locate a Date range
Author fransh@argo.net.au
Hi

We have a DateTime field storing a reminder time and want to check
this field every minute to see if the particular time has occurred
yet (a la MS Outlook). When we do a Findkey/Locate for the
particular person with the current time the instruction generates an
error complaining about the datefield format that we use inside the
Locate statement.

How should We store date&time? We have tried TdateTime as well as
String.

with Data.ReminderST do
begin
IndexFieldNames:='Who;Due_Date';
TheTime:=DateTimeToEncodeString(Now);
DateTimeToString(TheTime,'dd"-"mmm"-"yyyy',Now); //"hh:nn":00"',Now);
FindKey([Who,TheTime]); // also tried locate([]);

Can you suggest a cure?

Thanks

Francois