Microsoft KB Archive/32881

Works: Printing Reports in Month or Day Order

PSS ID Number: Q32881 Article last modified on 10-16-1998

1.00 1.05 2.00 3.00

MS-DOS

=
========================================================= 1.00 1.05 2.00 3.00 MS-DOS kbprint

Summary:

Data is often entered into a field in the Works Database in full-date format (month, day, year), and the field is formatted as a date field.

When you use the Works Database report function, you may want to print your report in order of days or months (that is, all January dates, followed by February dates, or all day-one reports followed by day-two reports, and so on). You can do this by adding a field to the database and using the =MONTH or =DAY function to extract the month or day from each date.

More Information:

In the following example, assume your date field is named Date1. To sort your report by the month or day in this field, do the following:

  In list view, insert a field next to the Date1 field.   Name the field “Month” or “Day” (without the quotation marks).   In the Month or Day field, enter the appropriate formula:   To sort by month, use the =MONTH(Date1) formula. -or-   To sort by day, use the =DAY(Date1) formula. 

This formula returns only the month or day from the Date1 field. Note: In Works version 3.0, if the date field has the same name as a Works function, such as Date or Year, the field name inside of the functions above will need to be enclosed in single quotation marks, for example, =DAY(‘Date’). This is not necessary in earlier versions.   Switch to report view, and sort by the Month or Day field. 

The report will be in month (or day) order. If you remove the =MONTH or =DAY formula from the Record row, the Month (or Day) field will not appear when the report is printed, but the Date1 field containing the complete date will still print in the correct order.

KBCategory: kbprint KBSubcategory: dworkskb

= Additional reference words: 1.00 1.05 2.00 3.00 =

Version : 1.00 1.05 2.00 3.00 Platform : MS-DOS ============================================================================= Copyright Microsoft Corporation 1998.