Home > Support > Resource Center > askSam 4 Documentation > Chapt8: Date Searches

First Document Previous Document Next Document Last Document Search Help

     Chapter 8     

     (continued)     

     Searching Documents With askSam     


Date Searches

The date search finds information according to a date contained in a field. There are three categories of date searches:

·     Simple Date Search ("find all documents earlier than...")

·     Date Range ("find all documents from 1970 to 1980")

·     Date Comparison ("find all documents where the date due is greater than 30 days from today").


Simple Date Searches

Simple date searches allow you to search for Documents where a field is less than, greater than, or equal to a specific date or a date in another field in the same Document.

For example, you would use this search to:

·     Locate Documents where the CALLBACK[ field is less than or equal to today's date.

·     Locate Documents where the ACTUAL_FINISH[ field is less than the PLANNED_FINISH[ field.


To execute a Simple Date Search:

1.     Choose ACTIONS -> OTHER SEARCHES -> DATE

The Date Search Dialog Box will appear.

2.     If the Date Search tab is not selected, choose it.


3.     Enter the name of the date field.

4.     Choose a Logical Operator (<,>,=,<=,>=,<>).

5.     You now have three options:

OPTION     DESCRIPTION


Date Field     Enter the name of another date field. This lets you select Documents      based on a comparison of two date fields.


Date     Enter a date to find all Documents less than, equal to, or greater than      this date.


Current Date     Finds all documents less than, equal to, or greater than today's date.      This option is most useful in reports. By using the current date option,      the current date is inserted in the report each time you run it.


Enter the appropriate selection.

6.     Choose OK.

askSam will execute the date search and open the Search Results Window at the bottom of the screen. The Documents retrieved by the search will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of the screen.

NOTES:

1.     askSam is able to work with Dates which are not in the 20th century or 21st century.

2.     Dates of varying formats can be mixed in a file and will still be understood. For example, askSam can compare, sort and evaluate a file with dates such as July 30th, 2000, 30 JUL. 2000, and 07-30-2000 mixed throughout the file.

3.     The “Match only the first occurrence of the field” dropdown menu has the following options:

OPTION     DESCRIPTION


Match only the first      (Default) If a Document contains multiple occurrences of the field you occurrence of the field.     are searching, askSam only searches in the first occurrence of the field.


Match any occurrences of     If a Document contains multiple occurrences of the field you are field.     searching, askSam looks for a match in any one of these fields.


Match all occurrences of field     If a Document contains multiple occurrences of the field you are      searching, askSam will only select the Document if the search is valid      in all of the fields.


4.     (askSam Professional version) To speed date searching in large files, you can specify date fields for askSam to index in the FILE -> INDEX Dialog Box.

5.     If a list of Fields does not appear in the drop down menu, check two things:

·     An Entry Form must be defined containing the field names.

·     The Field Character setting in the FILE -> PROPERTIES Dialog Box must contain the proper Field

Character.

Searching For A Date Range

The Date Range search lets you search for Documents with dates in a specific range.

For example, you would use this search to:

·     Locate Documents with dates from the third quarter of 2000.

·     Find people born from 1960 to 1970.


To Search for a Date Range:

1.     Choose ACTIONS -> OTHER SEARCHES -> DATE.

The Date Search Dialog Box will appear.

2.     Choose the Date Range tab.


3.     Enter the name of the date field.

4.     Choose a logical operator ( > or >= ).

5.     Enter a date or choose the Current Date option

This value will set the first boundary for the range of dates.

6.     Set the second logical operator ( < or <= ).

7.     Enter a second date or choose the Current Date option.

This value will set the second boundary for the range of dates.

8.     Choose OK.

askSam will execute the date search and open the Search Results Window at the bottom of the screen. The Documents retrieved by the search will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of the screen.

Date Comparisons

The Date Comparison allows you to search using an amount of time (days, months, or years) as the criteria. It allows you to compare a date field to a date or another date field and search on the time difference.


You can use this to:

·     find employees over the age of 50.

·     show accounts with a balance outstanding for more than 45 days (see Note).

·     Show all projects that took more than 3 months.


To Execute a Date Comparison Search:

1.     Choose ACTIONS -> OTHER SEARCHES -> DATE.

The Date Search Dialog Box will appear.

2.     Choose the Date Comparison tab.

The Date Comparison Dialog Box will appear.



3.     Enter the name of the first date field.

4.     Choose one of the following option:

OPTION     DESCRIPTION


Date Field     Enter the name of another date field to compare the dates in the two      fields.


Date     Enter a date to compare the date field to the date that you enter.


Current Date     Compares the date field to today's date. This option is most useful in      reports. By using the current date option, the current date is inserted in      the report each time you run it.


5.     Choose a logical operator (<,>,=,<=,>=,<>).

6.     Enter a number in the quantity field.

7.     Choose either days, months, or years.

8.     Choose OK.

askSam will execute the date search and open the Search Results Window at the bottom of the screen. The Documents retrieved by the search will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of the screen.

Example:


To search for people over the age of 50:

1.     Choose ACTIONS -> OTHER SEARCH -> DATE.

2.     Choose the Date Comparison tab.

The Comparison Dialog Box will appear.

3.     Enter the name of the date field. For example: BORN[

4.     Choose the current date option.

5.     Choose the logical operator  >

6.     Enter the number 50 in the quantity field.

7.     Choose Years.

8.     Choose OK.

NOTE: For some Comparison Searches you will need to use the Search Dialog (described later in this chapter).

For example: Searching for all accounts outstanding for more than 45 days. If you were only to enter a search for the Due[ field greater than 45 days, it would locate clients who are more than 45 days past due. It would also locate clients who are due 45 days or more in the future. To just find those that are past due, you would use the Search Dialog and define 2 date searches. The first would be a Simple Date Search for clients whose due date is earlier than today's date. The second date search would be the Comparison, searching for those who are more than 45 days past due. The combination of these two searches would retrieve the proper clients.


Quick Downloads

 

How people use askSam

 

Surf Report Newsletter

Subscribe today to receive our FREE monthly newsletter. The Surf Report includes tips, articles, and information about new releases, upgrades, free utilities, and special promotions. Sign up today!


Read Back Issues »
 

"askSam is an essential part of my software tool chest. I can research and collect data from anywhere and any source. Once it is in askSam I can edit, rearrange, organize, and search the information easily. Then I can present it and make it totally useful for other people via the web or CD. Fantastic!"

-- Valda Hilley, Author, Literary Agent, Teaching Consultant, Pack rat, and President, Convergent Press, Ltd.

 

Seaside Software Inc. DBA askSam Systems, 121 S Jefferson Street, Perry FL 32347
Telephone: 800-800-1997 / 850-584-6590   •   Email: info@askSam.com   •   Support: http://www.askSam.com/central.asp
© Copyright 1985-2012   •   Privacy Statement