Smiffy
21st February 2002, 14:51
Is it possible to have a reverse order index for a date field on a table.
Requirement:
A display session will show records from the sessions main table. The records are required to be displayed in descending date sequence. i.e. latest date first.
I have solved this previously by creating a new field on the table. Baan represents dates as a number (number of days since...). This number is subtracted from zero to give a negative version of the date. This is stored on the table as a long. When this new field on the table is set as an index, this results in the records being in reverse date order (when that index is selected as the sort sequence).
The question is; Is there an easier way to provide this facility, without having to create this new field?
Requirement:
A display session will show records from the sessions main table. The records are required to be displayed in descending date sequence. i.e. latest date first.
I have solved this previously by creating a new field on the table. Baan represents dates as a number (number of days since...). This number is subtracted from zero to give a negative version of the date. This is stored on the table as a long. When this new field on the table is set as an index, this results in the records being in reverse date order (when that index is selected as the sort sequence).
The question is; Is there an easier way to provide this facility, without having to create this new field?