Works: How to Query for Records Between Two Dates (78736)



The information in this article applies to:

  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a
  • Microsoft Works for Windows 95, version 4.0 4.5a
  • Microsoft Works 2.0
  • Microsoft Works 3.0

This article was previously published under Q78736

SUMMARY

Use a formula to query for database records that are on or between two dates in Works for Windows. This article lists formulas for Works 2.x and 3.x, and for Works for Windows 95.

MORE INFORMATION

For records with dates between 1/1/89 and 2/15/89, use the formula below for your version of Works:

In Works for Windows 95

Filter Using Formulas:

  1. On the Tools menu, click Filters. Select the Filter using formula button at the top of the Filter dialog box.
  2. Type the formula:

    ='Fieldname1'>="1/1/89"#AND#'Fieldname1'<="2/15/89"

  3. Select the Apply Filter button.
To use the Easy Filter option:

  1. In the Filters dialog box, click the Field name.
  2. In the Comparison section, choose Is greater than or equal to.
  3. In the Compares To box type 1/1/89.
  4. Select the And option.
  5. In the second Field Name box, click the date field.
  6. In the Comparison section, choose Is less than or equal to.
  7. In the Compare To box, type 2/15/89.

In Works version 3.0x for Windows

To enter a query using Query View in Works for Windows version 3.0x:

  1. On the Tools menu, click Create New Query. Click the Query View button at the bottom of the Query dialog box.
  2. Type the formula >='1/1/89'#and#<='2/15/89' in the date field.
  3. To see the results, switch to list view by clicking the List button on the tool bar, or clicking List on the View menu.
To enter a query in the dialog box:

  1. On the Tools menu, click Create New Query.
  2. In Choose A Field To Compare, select the date field.
  3. In How To Compare The Field, select Is greater than or equal to.
  4. In Value To Compare The Field, type 1/1/89.
  5. In Choose A Field To Compare, select the date field.
  6. In How To Compare The Field, select Is less than or equal to.
  7. In Value To Compare The Field, type 2/15/89.

In Works version 2.0x for Windows

To enter a query in Works for Windows version 2.0x:

  1. Click the Query button on the tool bar, or click Query on the View menu.
  2. Type the formula >='1/1/89'&<='2/15/89' in the date field.
  3. To see the results of the query, click the List button on the tool bar, or click List on the View menu.

REFERENCES

For more information about how to perform this task in Works for Windows 95, see your Works printed documentation or online Help.

"Microsoft Works for Windows User's Guide," version 3.0, page 373

"Microsoft Works for Windows User's Guide," version 2.0, page 283

Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbhowto KB78736