Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search strings
Message
From
10/04/2000 12:17:22
 
 
To
10/04/2000 12:03:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00357543
Message ID:
00357570
Views:
16
Tyler,

>m.sqlstr = "member.memdate >= {04/01/ + alltrim(str(year(date())-1))} "
>m.sqlstr = m.sqlstr + " and member.memdate <= {03/31/ + alltrim(str(year(date())))}"

Try at the command window first:
? {04/01/ +alltrim(str(year(date())-1))}
That evaluates to an empty date.

You need
m.sqlstr = "member.memdate >= {04/01/" + alltrim(str(year(date())-1)) + "} "
to hardcode the date into the sqlstr. Better than that would be an unambiguous-format date:
m.sqlstr = "member.memdate >= {^" + alltrim(str(year(date())-1)) + "-04-01} "
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform