database sort

This forum is a self-help system for the exchange of ideas among AppleWorks users.

database sort

Postby Pennie » Tue Jul 03, 2007 10:06 am

I have a DB of a club membership. I want to sort them by birthdate. AW insists on sorting them like this: (the month abbreviations are not in the DB. I put them here for clarity.)
1 (jan)
2 (feb)
10 (oct)
11 (nov)
12 (dec)
3 (mar) etc.
Is there a punctuation or keystroke or something I can use to put 10, 11 and 12 at the end where they belong?

Thanks!
Pennie
 
Posts: 3
Joined: Sun Jan 02, 2005 6:54 pm

Re: database sort

Postby Barry » Tue Jul 03, 2007 10:35 am

Pennie wrote:I have a DB of a club membership. I want to sort them by birthdate. AW insists on sorting them like this: (the month abbreviations are not in the DB. I put them here for clarity.)
1 (jan)
2 (feb)
10 (oct)
11 (nov)
12 (dec)
3 (mar) etc.
Is there a punctuation or keystroke or something I can use to put 10, 11 and 12 at the end where they belong?

Thanks!


You've apparently used a Text type field in which to place the dates, and the DB is sorting the entries alphabetically, as it normally would for text.

You should be able to add a zero to the beginning of each January to September entry to correct the sort.

Alternately, you could change the field type to Number. This would require reformatting your entries to use a decimal as the month/day separator so that January 15 would be shown by 1.12 and December 1 by 12.01 (the two digit day is necessary to keep the days in order).

AppleWorks correctly sorts dates placed in Date fields, and can display those dates in a number of formats. This is the best solution IF you are recording the full birthdate. It won't work if you are recording only the month and day of the anniversary.

If you record the full birthdate, and also want to make a birthday reminder list, you'll need to add one or more fields on which to sort the entries by month and day.

'Month': MONTH('Birthdate')
'Day': DAY('Birthdate')

The two fields extract the month (1 to 12) and day from each birthdate ('Birthdate' must be a Date type field). A three level sort (all ascending) on 'Birthdate' then 'Day' then 'Month' will group the the names by month, with the dates in order within each month and with those having the same birthday arranged from oldest to youngest.

Regards,
Barry
Barry
 
Posts: 1390
Joined: Mon Sep 30, 2002 12:54 am
Location: 48°50' N 123° 30'W


Return to AppleWorks Help

cron
AppleWorks Users Group Logo iWork Users Group Logo