neobookers:
i work with the amazing plugin of hans-peter (hpwutility) which i wanna use in combination with neobookdb to filter records via dates.
- there are two variables ([Date1] , [Date2] ) where the chosen dates, selected via hans-peters calendars, are stored
- within the database there are two columns (DATEFROM,DATETO) which contains dates
- the query code itself is stored in a query button used by the user after selected the two dates
Now, my intension is to create a code below:
unfortunately this doesn't work!?
dbfQuery "xyz.dbf" "DATEFROM>=[Date1] AND DATETO=<[Date2]"
If "[dbfQueryResult]" ">" "0"
dbfQuery "xyz.dbf" "DATEFROM>[Date1] AND DATETO<[Date2]"
else
dbfShowAll "xyz.dbf"
endIf
but the grazy thing is that the following code works:
dbfQuery "xyz.dbf" "DATEFROM=[Date1] AND DATETO=[Date2]"
If "[dbfQueryResult]" ">" "0"
dbfQuery "xyz.dbf" "DATEFROM=[Date1] AND DATETO=[Date2]"
else
dbfShowAll "xyz.dbf"
endIf
Can anyone tell me why, what is my mistake and is there maybe a better way to go?
Thanks a lot.