General information
Category:
Coding, syntax & commands
Title:
Select query between dates
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only