PDA

View Full Version : My sort doesn't work


ABC123

Beltronics
11-02-2003, 05:13 AM
Hello,

I have specified a sort on two fields.
First field is a character field, second is a date field.
In defining the sort, I used the expression

character+date

It sorts on character and then by record number instead of date. Is there something I need to do to the date field before the sort will recognize it?

Jim Belanger

crimmelcp
11-02-2003, 06:06 AM
Jim:
You might try

character+dtoc(date)

Charlie Crimmel

Tom Cone Jr
11-02-2003, 06:48 AM
Jim,

To elaborate on the advice given thus far,
you might read up on character string operators.

The plus symbol will concatenate two string (character) values.

A date field contains a date value, not a character string value.

In order to concatenate the two field values you must convert fields that are not character strings already into their string equivalents. This will be true for date fields, and also for numeric fields.

Hope this helps. -- tom

Beltronics
11-02-2003, 01:49 PM
Yup, that helps.

Beltronics
11-02-2003, 01:50 PM
I thank you. I knew that but had a brain cramp!!