Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closest matching records
Message
From
31/08/2005 04:34:47
 
 
To
30/08/2005 23:41:57
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01045374
Message ID:
01045411
Views:
21
Tariq,

Will this do?
CREATE CURSOR Dates (MyDate D)
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 2, 25))
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 4, 12))
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 5, 22))
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 5, 28))
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 6, 5))
INSERT INTO Dates (MyDate) VALUES (DATE(2005, 8, 31))

ldSearch = DATE(2005, 5, 25)

SELECT MAX(MyDate) FROM Dates WHERE;
 MyDate <= ldSearch;
 UNION;
 SELECT MIN(MyDate) FROM Dates WHERE;
 MyDate > ldSearch
>Dear Professors
>
>Field1 entitled date1, of table1, has following date type data
>
>{25/02/2005}
>{12/04/2005}
>{22/05/2005}
>{28/05/2005}
>{05/06/2005}
>{31/08/2005}
>
>In text1 I enter date {25/05/2005}, This date is not in table.
>Is it possible to findout TWO closet matching dates i.e
>
>{22/05/2005} && closest smaller date
>{28/05/2005} && closest bigger date
>
>Please help
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform