Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter records using BETWEEN
Message
From
25/08/2003 06:12:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/08/2003 04:00:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00822981
Message ID:
00822990
Views:
18
>i use SET FILTER TO BETWEEN(date,from,to) to filter records whose time fall between from and to.
>
>now, i have a table with datefrom and dateto fields. i have in my form two textfields that accepts from and to.
>
>how do i use BETWEEN to filter my records given the from and to inputted by my users to select all records in my table that is between datefrom and dateto fields?
lcFilter = 'datefrom <= '+;
  trans(dtoc(thisform.txtTo.Value,1),'@R {^9999/99/99')+'} and '+;
  'dateTo >= '+;
  trans(dtoc(thisform.txtFrom.Value,1),'@R {^9999/99/99')+'}'
set filter to &lcFilter
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform