>Ed,
>
>Hmmm... thanks for the info. It is a very important problem to the program, which I didn't realised before. So, how do I store them as date, in 99/99 format? Just change the data type as date? Then when retrieving data, just set them as SUBSTR(date,4,5)?
>
I've gotten in the habit of always using a date field for the representation, and then forcing the date for the month to the first of the month when I want to ignore the day. This now lets me handle sorts trivially; no SUBSTR() is needed, and if I need to concatenate a key, I can use the DTOS() of the date field.
You'll need to write a bit of code to handle the data representation in forms to allow entry into a text field and convert it to and from a date field. It's not all that tought to do, and you just do it once in a textbox class that handles that particular data entry task, and then use the textbox class as needed. You can create the MM/YY output in reports and for displays pretty trivailly using the MONTH() and YEAR() functions.
>Gan
>
>>
>>lets take a simple example where you want things sorted in ascending order, and you have an entry in December of 1999, which you've stored as 12/99, and another in January of 2000, which you've stored as 01/00. You use your sort expression given in the sample code. Which one will appear first?