Subject Re: indexing nightmare!!
From Charlie <trainman@traincity.com>
Date Tue, 02 Feb 2016 16:36:54 -0500
Newsgroups dbase.getting-started

Ken Mayer Wrote:

> On 2/2/2016 8:07 AM, Charlie wrote:
> >>> Try the following (untested unfortunateley)
> >>>
> >>>      index on lname+fname+dtos({01/01/20000}-sdate)
> >>>
> >>>
> >>> Mervyn.
> >>>
> >>> Hi Mervyn... OK will do when I get to the store.  Thanks very much!!!
> >>>
> >> ERROR.. DATA TYPE MISMATCH.. expecting date.
> >
> > I got that message when I tired this.  I made 20000 2000....
>
> Actually, remove the call to DTOS() in the index command. Subtracting a
> date from another date typically returns a numeric value in days. For
> example, in the command window:
>
> ? date()- {01/01/2016}
>
> Assuming today's date is 2/2/2016, this will return 32, which is the
> number of days.
>
> So DTOS is confused, it's seeing a numeric value, not a date value.
>
> Ken
>
>
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm

Thanks for the tip Ken... One thing led to another and this is what I ended up with...
index on lname+fname+str(1000000 - invno) tag yellow
Between your tip and the old Borland dbase 4 books I finally figured this out.  And I actually understand it!  Thank goodness for miracles!~~!