3.766 bytes |
Service Hints & Tips |
Document ID: DJON-3FYKHY |
PS/1-Aptiva - Doing queries on multiple date fields in the database
Applicable to: United States
In Microsoft Works, queries entered in separate date fields in the View Query screen have the effect of linking the queries with an AND (&) operator. To achieve an OR (|) link, queries must be entered into one field at a time. For example, if a database has several fields that include dates (for example, birthday, graduation, and anniversary fields) and you need a query to return all the records for January, only one field can have the query formula.
To query on multiple date fields within the same database, enter one query in one date field, using the MONTH function and the OR (|) operator, to find all the dates in each field.
For example, to query on the month of January in three date fields (birthday, graduation, and anniversary), enter the following formula in the "birthday" field in View Query screen:
=MONTH()=1|MONTH(graduation)=1|MONTH
(anniversary)=1
The above formula is to be typed continuously on one line. However, due to space limitations, it shows on two. The "1" in this formula refers to the month of January; use "2" for February, and so on. After pressing ENTER and F10 (or choosing List or Form from the View menu), the above example shows all records containing a January date from the three fields listed.
Search Keywords |
DOS | |
Hint Category |
Productivity Software | |
Date Created |
09-04-97 | |
Last Updated |
25-03-99 | |
Revision Date |
25-03-2000 | |
Brand |
IBM Aptiva | |
Product Family |
Aptiva, PS/1 | |
Machine Type |
2011, 2144, 2168, 2121, 2123, 2133, 2155 | |
Model |
C01; C34; M01; NEA; T35; U35; A62; A82; A94; B82; C42; C92; G42; M82; S92; 081; 087; 131; 137; K37; N31; N81; 11E; 13T; 14C; 16E; 17A; 18A; 18T; 19C; 21C; 23C; 28A; 46M; 51D; D50; G11; G13; G43; G46; G46; G49; G49; G50; G53; M40; M40; M46; M46; P11; P13; P43; P50; P53; R04; R05; R06; R09; R38; R42; R43; R44; R84; R86; R87; RO3; S11; S13; S43; S45; S45; S47; S47; S48; S48; S50; S53; W11; W13; W42; W42; W43; W45; W45; W50; W53; 20E; 22T; 24C; 24M; 28V; 39E; 41T; 43C; 45V; 48E; 50T; 52C; 55V; 72E; 74T; 76C; 78C; 79C; 81A; 82E; 84T; 86C; 87C; CC1; D53; G14; G44; G52; G54; G72; G76; G78; G82; NM1; P14; P44; P57; P71; P74; P76; P78; P84; R14; R15; R16; R17; R18; R51; R52; R57; R58; R62; R63; R67; R71; R89; R93; R96; R97; S14; S44; S50; S54; S70; S75; S76; S78; S80; W14; W44; W48; W54; W67; W76; W77; W78; Z33; 28V; 31E; 33T; 37C; 38C; 51E; 54T; 56C; 57C; 88V; BB1; G57; G87; OR1; OR3; OR4; OR5; P89; R28; R29; R31; R74; R78; R82; R98; S55; S85; SR1; US1; W52; W82; 2R0; P30; 2R3; S15 | |
TypeModel |
2011C01 | |
Retain Tip (if applicable) |
| |
Reverse Doclinks |