Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select query between dates
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Select query between dates
Miscellaneous
Thread ID:
00803952
Message ID:
00803952
Views:
45
Hello Fred,

Can you please help me out on this:

I use the following to attach to the where statement these are from and to date fields:

the values in the text box appears like this when i debug:
thisform.txtfrm.value = {06/01/03}
thisform.txtto.value = {06/25/03}

In some project sites it works fine with out any problem but for those sites whose project is 5 years old there it is giving problems it is giving errors at clist1 and clist2 in the code.

It says: Function argument value, type, or count is invalid.

is there any other way to handle the between dates where condition Please other than this:

*********************COde********************************
clist1 = dtoc(thisform.txtfrm.value)
clist2 = dtoc(thisform.txtto.value)

SET STRICTDATE TO 0

IF NOT EMPTY(cWhereStatement) then
cWhere = " AND BETWEEN(docdate,{" + clist1 + "}, {" + clist2 + "})"
cWhereStatement = cWhereStatement + cWhere
ELSE
cWhere = " Where BETWEEN(docdate," + clist1 + "," + clist2 + " )"
cWhereStatement = cWhere
ENDIF
**********************END********************************
Next
Reply
Map
View

Click here to load this message in the networking platform