Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Syntax problem
Message
From
23/12/2003 03:16:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/12/2003 17:22:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00861436
Message ID:
00861515
Views:
21
Jeana,
As Trey already pointed out probably there is already a fieldname called myDate.
Browse for ShipDate <= Date(2003,12,22)
This command doesn't need a set filter. Or if you really need a set filter either prefix it with m. and be sure m.myDate is in scope or directly use your constant value in set filter (it's in scope in your sample code). Beware that 'set filter' expression is reevaluated, set key OTOH is evaluated only once. ie:
Set filter to shipdate <= Date(2003,12,22)
If you have an index on shipdate and it's the active index then :
Set key to range {},Date(2003,12,22)
Is alternative filtering which is fast.

This is a sample to reproduce your problem :
Shipped_on = date(1993,7,31)
use testdata!orders
set filter to order_date <= Shipped_on
browse fields order_id,order_date,shipped_on title "No m. prefix"
set filter to order_date <= m.Shipped_on
browse fields order_id,order_date,shipped_on title "With m. prefix"
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