Jon,
I've just created test case and tried it. All works just fine.
Here is the test case:
create cursor test (BankCode C(4), ValueDate D)
for i=10 to 5000
insert into test values (str(i,4), date()-(i*mod(i,2)))
insert into test values (str(i,4), date()-4)
next
index on BankCode+bintoc(date(2001,12,31)-ValueDate)) tag test
seek seek str(27,4)+bintoc(date(2001,12,31)-date()+4)
>>Looks like I and Larry were too quick in our first suggestion. Sergey is right.
>>
>>So, use the fixed date and Bintoc function, e.g.
>>BankCode+bintoc(date(2001,12,31)-ValueDate))
>
>Nadya,
>
>Well, we're unfortunately not out of the woods yet. :(
>
>When we implement the BINTOC in the tag, we're encountering some strange behaviour. If we browse the table in the IDE with that tag order set, the record order is exactly what we expect. However, if we try to seek a record using the same syntax as the key expression it will always fail.
>
>Is there something about creating an expression with BINTOC that's causing a problem when trying to look up the record?
>
>Laterness,
>Jon
If it's not broken, fix it until it is.
My Blog