Microsoft KB Archive/77002

= Works: Sorting by Month or Day in Date Field =

Article ID: 77002

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Works 2.0 Standard Edition
 * Microsoft Works 2.0a
 * Microsoft Works 3.0 Standard Edition
 * Microsoft Works 3.0a
 * Microsoft Works 3.0b
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 4.0a

-



This article was previously published under Q77002



SYMPTOMS
When data is entered in the Works Database in date format and the field is formatted as a date field, you can sort based on the entire date entered. However, you cannot sort solely by month or day.

For example, if you have several entries for January, you cannot sort by month to have all the January dates appear together, followed by February's dates, and so on.



RESOLUTION
You can work around this limitation by doing the following:

 Insert a field next to the date field by clicking Insert Record/Field from the Edit menu. Name the field &quot;Month&quot; or &quot;Day&quot; using the Edit Name command. With Works for Windows 95, click Insert Field from the Record menu and name the field in the dialog box. In the Month field, enter the formula =MONTH(Date), where (Date) is the name of the field containing the complete date. For example, the following formula returns only the month from the date field:

=MONTH('7/5/92')

To sort by day, enter the formula =DAY(Date), where (Date) is the name of the field containing the complete date. For example, the following formula returns only the day from the date field:

=DAY('7/5/92')

 From the Record menu (Works 4.0, 4.5 and 4.5a for Windows 95), Tools menu (Works 3.0), or Select menu (Works 2.0), click Sort Records to sort on the field named Month.

Additional query words: 2.00 2.00a 3.00 3.00a 3.00b 4.00 4.00a 4.50 4.50a w_works db fmt

Keywords: kbprb KB77002

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.